MprAdminInterfaceSetCredentialsEx function (mprapi.h)

Use the MprAdminInterfaceSetCredentialsEx function to set extended credentials information for an interface. Use this function to set credentials information used for Extensible Authentication Protocols (EAPs).

Syntax

DWORD MprAdminInterfaceSetCredentialsEx(
  [in] MPR_SERVER_HANDLE hMprServer,
  [in] HANDLE            hInterface,
  [in] DWORD             dwLevel,
  [in] LPBYTE            lpbBuffer
);

Parameters

[in] hMprServer

Handle to a router. This handle is obtained from a previous call to MprAdminServerConnect.

[in] hInterface

Handle to the interface. This handle is obtained from a previous call to MprAdminInterfaceCreate.

[in] dwLevel

A DWORD value that describes the format in which the information is structured in the lpbBuffer parameter. Acceptable values for dwLevel include 0 or 1 as listed in the following table. A value of 1 indicates the information is a pre-shared key for the interface.

Value Structure Format
0 Windows 2000 Server: MPR_CREDENTIALSEX_0
1 Windows Server 2003 or later: MPR_CREDENTIALSEX_1

[in] lpbBuffer

A pointer to a MPR_CREDENTIALSEX_0 or MPR_CREDENTIALSEX_1 structure. The dwLevel parameter indicates the type of structure.

Return value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Value Meaning
ERROR_ACCESS_DENIED
The calling application does not have sufficient privileges.
ERROR_INVALID_HANDLE
The hInterface value is invalid.
ERROR_INVALID_PARAMETER
The lplpbBuffer parameter is NULL.
ERROR_NOT_ENOUGH_MEMORY
Insufficient resources to complete the operation.
ERROR_NOT_SUPPORTED
The dwLevel value is invalid.

Remarks

To a delete a pre-shared key, call MprAdminInterfaceSetCredentials with the dwSize member of the MPR_CREDENTIALSEX_1 structure set to zero.

Requirements

Requirement Value
Minimum supported client None supported
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header mprapi.h
Library Mprapi.lib
DLL Mprapi.dll

See also

MPR_CREDENTIALSEX_0

MPR_CREDENTIALSEX_1

MprAdminInterfaceCreate

MprAdminInterfaceSetCredentials

MprAdminInterfaceSetCredentialsEx

MprAdminServerConnect