RasSetCustomAuthData function

Use the RasSetCustomAuthData function to set connection-specific authentication information. This information should not be specific to a particular user.

Syntax


DWORD RasSetCustomAuthData(
  _In_  LPCWSTR pszPhonebook,
  _In_  LPCWSTR pszEntry,
  _In_  BYTE *pbCustomAuthData,
  _In_  DWORD dwSizeofCustomAuthData
);

Parameters

pszPhonebook [in]

Pointer to a null-terminated string that specifies the full path of the phone-book (PBK) file. If this parameter is NULL, the function uses the system phone book.

pszEntry [in]

Pointer to a null-terminated string that specifies an existing entry name.

pbCustomAuthData [in]

Pointer to a buffer that specifies the new authentication data.

dwSizeofCustomAuthData [in]

Specifies the size of the data pointed to by the pbCustomAuthData parameter.

Return value

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.

ValueMeaning
E_INVALIDARG

The dwSizeofCustomAuthData parameter is zero, or the pbCustomAuthData 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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ras.h

Library

Rasapi32.lib

DLL

Rasapi32.dll

Unicode and ANSI names

RasSetCustomAuthDataW (Unicode) and RasSetCustomAuthDataA (ANSI)

See also

RasGetCustomAuthData
RasSetEapUserData

 

 

Community Additions

ADD
Show:
© 2015 Microsoft