Platform SDK: RAS/Routing and RAS

RasSetEapUserData

Use the RasSetEapUserData function to store user-specific Extensible Authentication Protocol (EAP) information for the specified phone-book entry in the registry.

DWORD RasSetEapUserData(
  HANDLE hToken,           // access token for user
  LPCTSTR pszPhonebook,    // path to phone book to use
  LPCTSTR pszEntry,        // name of entry in phone book
  BYTE *pbEapData,         // data to store for the user
  DWORD dwSizeofEapData,   // size of data
);

Parameters

hToken
Handle to a primary or impersonation access token that represents the user for which to store data. This parameter can be NULL if the function is called from a process already running in the user's context.
pszPhonebook
Pointer to a null-terminated string containing the full path of the phone-book (PBK) file. If this parameter is NULL, the function will use the system phone book.
pszEntry
Pointer to a null-terminated string containing an existing entry name.
pbEapData
Pointer to the data to store for the user.
dwSizeofEapData
Specifies the size of the data pointed to by the pbEapData parameter.

Return Values

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 dwSizeofEapData parameter is zero, or the pbEapData parameter is NULL.
ERROR_CANNOT_OPEN_PHONEBOOK RasSetEapUserData was unable to open the specified phone-book file.
ERROR_CANNOT_FIND_PHONEBOOK_ENTRY RasSetEapUserData 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.

Requirements

  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.

See Also

Remote Access Service (RAS) Overview, Remote Access Service Functions, RasGetEapUserData, RasInvokeEapUI