RasGetCustomAuthData function

Use the RasGetCustomAuthData function to retrieve connection-specific authentication information. This information is not specific to a particular user.

Syntax


DWORD RasGetCustomAuthData(
  _In_    LPCWSTR pszPhonebook,
  _In_    LPCWSTR pszEntry,
  _Out_   BYTE    *pbCustomAuthData,
  _Inout_ DWORD   *pdwSizeofCustomAuthData
);

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 [out]

Pointer to a buffer that receives the authentication data. The caller should allocate the memory for this buffer. If the buffer is not large enough, RasGetCustomAuthData returns ERROR_BUFFER_TOO_SMALL, and the pdwSizeofEapData parameter contains the required size.

pdwSizeofCustomAuthData [in, out]

Pointer to a DWORD variable that, on input, specifies the size of the buffer pointed to by the pbCustomAuthData parameter.

If the buffer specified by the pbCustomAuthData parameter is not large enough, pdwSizeofEapData receives, on output, the required size.

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 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.

 

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

RasGetCustomAuthDataW (Unicode) and RasGetCustomAuthDataA (ANSI)

See also

RasGetEapUserData
RasSetCustomAuthData

 

 

Show: