The RasSetEntryProperties function changes the connection information for an entry in the phone book or creates a new phone-book entry.
DWORD RasSetEntryProperties(
LPCTSTR lpszPhonebook, // pointer to full path and filename of
// phone-book file
LPCTSTR lpszEntry, // pointer to an entry name
LPRASENTRY lpRasEntry, // buffer that contains entry information
DWORD dwEntryInfoSize, // size, in bytes, of the lpRasEntry
// buffer
LPBYTE lpbDeviceInfo, // buffer that contains device-specific
// configuration information
DWORD dwDeviceInfoSize // size, in bytes, of the lpbDeviceInfo
// buffer
);
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.
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.
Windows NT: This parameter is unused. The calling function should set this parameter to NULL.
Windows NT: This parameter is unused. The calling function should set this parameter to zero.
If the function succeeds, the return value is zero.
If the function fails, the return value can be one of the following error codes.
Value | Meaning |
---|---|
ERROR_BUFFER_INVALID | The address or buffer specified by lpRasEntry is invalid. |
ERROR_CANNOT_OPEN_PHONEBOOK | The phone book is corrupted or missing components. |
Windows CE: For Windows CE version 1.0, the lpbDeviceInfo and lpdwDeviceInfoSize parameters are ignored and should be set to NULL. To set device specific configuration information use the RasSetEntryDevConfig function.
For Windows CE version 2.0 and later, device configuration information can be set by using lpbDeviceInfo and lpdwDeviceInfoSize parameters.
Windows NT: Requires version 4.0 or later.
Windows: Requires Windows 95 OSR2 or later.
Windows CE: Requires version 1.0 or later.
Header: Declared in ras.h.
Import Library: Use rasapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT.
Remote Access Service Overview, RAS Server Administration Functions, RASENTRY, RasCreatePhonebookEntry, RasGetEntryProperties, RasValidateEntryName