RasSetEntryPropertiesA function (ras.h)
The RasSetEntryProperties function changes the connection information for an entry in the phone book or creates a new phone-book entry.
DWORD RasSetEntryPropertiesA( LPCSTR , LPCSTR , LPRASENTRYA , DWORD , LPBYTE , DWORD );
Pointer to a null-terminated string that specifies the full path and file name of a phone-book (PBK) file. If this parameter is NULL, the function uses the current default phone-book file. The default phone-book file is the one selected by the user in the User Preferences property sheet of the Dial-Up Networking dialog box.
Pointer to a null-terminated string that specifies an entry name.
If the entry name matches an existing entry, RasSetEntryProperties modifies the properties of that entry.
If the entry name does not match an existing entry, RasSetEntryProperties creates a new phone-book entry. For new entries, call the RasValidateEntryName function to validate the entry name before calling RasSetEntryProperties.
Pointer to the RASENTRY structure that specifies the new connection data to be associated with the phone-book entry indicated by the lpszEntry parameter.
The caller must provide values for the following members in the RASENTRY structure.
If values are not provided for these members, RasSetEntryProperties fails with ERROR_INVALID_PARAMETER.
The structure might be followed by an array of null-terminated alternate phone number strings. The last string is terminated by two consecutive null characters. The dwAlternateOffset member of the RASENTRY structure contains the offset to the first string.
Specifies the size, in bytes, of the buffer identified by the lpRasEntry parameter.
Pointer to a buffer that specifies device-specific configuration information. This is opaque TAPI device configuration information. For more information about TAPI device configuration, see the lineGetDevConfig function in Telephony Application Programming Interfaces (TAPI) in the Platform SDK.
Windows XP: This parameter is unused. The calling function should set this parameter to NULL.
Specifies the size, in bytes, of the lpbDeviceInfo buffer.
Windows XP: This parameter is unused. The calling function should set this parameter to zero.
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value is one of the following error codes or a value from Routing and Remote Access Error Codes or WinError.h.
||The user does not have the correct privileges. Only an administrator can complete this task.|
||The address or buffer specified by lpRasEntry is invalid.|
||The phone book is corrupted or missing components.|
||The RASENTRY structure pointed to by the lpRasEntry parameter does not contain adequate information, or the specified entry does not exist in the phone book. See the description for lpRasEntry to see what information is required.|
When setting properties for an all-users connection, if the calling application specifies a non-NULL value for the phone-book parameter, lpszPhonebook, the phone-book file must be located in the phone-book directory beneath the all-users application data path. To obtain the correct location for the phone-book file, first call SHGetFolderPath with a CSIDL value of CSIDL_COMMON_APPDATA. SHGetFolderPath returns the all-users application data path. Append the following string to this path:
The combined path is the correct location for the phone-book file.
The ras.h header defines RasSetEntryProperties as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|