Platform SDK: RAS/Routing and RAS |
Use the RasGetCustomAuthData function to retrieve connection-specific authentication information. This information is not specific to a particular user.
DWORD RasGetCustomAuthData ( LPCWSTR pszPhonebook, // path to phone book to use LPCWSTR pszEntry, // name of entry in phone book BYTE * pbCustomAuthData, // buffer to receive data DWORD * pdwSizeofCustomAuthData // size of buffer );
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the retun value is one of the following error codes.
Value | Meaning |
---|---|
E_INVALIDARG | The pdwSizeofCustomAuthData parameter is NULL. |
ERROR_BUFFER_TOO_SMALL | The buffer pointed to by pbCustomAuthData is too small to receive the data. The pdwSizeofCustomAuthData contains the required size. |
ERROR_CANNOT_OPEN_PHONEBOOK | RasGetEapUserData was unable to open the specified phone-book file. |
ERROR_CANNOT_FIND_PHONEBOOK_ENTRY | RasGetEapUserData was unable to find the specified entry in the phone book. |
Other | Use FormatMessage to retrieve the system error message that corresponds to the error code returned. |
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Ras.h.
Library: Use Rasapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.