RasSetEntryProperties function fails with error 621 when you call the function in a service that is running under a local system account (884502)
The information in this article applies to:
- Microsoft Windows 2000 Professional
- Microsoft Windows 2000 Server
- Microsoft Windows 2000 Advanced Server
- Microsoft Windows 2000 Datacenter Server
- Microsoft Windows Server 2003, Datacenter Edition
- Microsoft Windows Server 2003, Standard Edition
- Microsoft Windows Server 2003, Enterprise Edition
- Microsoft Windows XP Home Edition
- Microsoft Windows XP Professional
SYMPTOMSIf you call the RasSetEntryProperties function, and you pass the lpszPhonebook parameter as NULL to create a new remote access service entry or
to modify an existing entry in a Win32 service that is running under the
context of the local system account, you may receive the following error
message: error 621
(ERROR_CANNOT_OPEN_PHONEBOOK) CAUSEThe lpszPhonebook parameter is a pointer to a null-terminated string that specifies
the full path and file name of a phonebook (.pbk) file. If this parameter is
NULL, the function uses the current default phonebook file. When you call the RasSetEntryProperties
function in
a Win32 service that is running under the context of the local system account,
and the lpszPhonebook parameter is set to NULL, the function tries to locate the phonebook file in the %Documents and
Settings%\LocalSystem folder. However, the %Documents and
Settings%\LocalSystem folder does not exist, and you receive the 621 error
message.RESOLUTIONYou can pass in the complete path of the All Users remote
access phonebook file to the RasSetEntryProperties function to create the entry. The following is the complete path: %Documents and Settings%\All
Users\Application
Data\Microsoft\Network\Connections\Pbk\Rasphone.pbk STATUS This
behavior is by design.
Modification Type: | Major | Last Reviewed: | 9/16/2004 |
---|
Keywords: | kbAPI kbAutomation kbProgramming kbtshoot kbprb KB884502 kbAudDeveloper |
---|
|