Export (0) Print
Expand All

MprAdminServerGetCredentials function

The MprAdminServerGetCredentials function retrieves the pre-shared key for the specified server.

Syntax


DWORD MprAdminServerGetCredentials(
  _In_  MPR_SERVER_HANDLE hMprServer,
  _In_  DWORD             dwLevel,
  _Out_ LPBYTE            *lplpbBuffer
);

Parameters

hMprServer [in]

Handle to a Windows server. Obtain this handle by calling MprAdminMIBServerConnect.

dwLevel [in]

A DWORD value that describes the format in which the information is returned in the lplpbBuffer parameter. Must be zero.

lplpbBuffer [out]

On successful completion, a pointer to an MPR_CREDENTIALSEX_1 structure that contains the pre-shared key for the server. Free the memory occupied by this structure with MprAdminBufferFree.

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.

ValueMeaning
ERROR_ACCESS_DENIED

The calling application does not have sufficient privileges.

ERROR_INVALID_PARAMETER

The lplpbBuffer parameter is NULL.

ERROR_NOT_SUPPORTED

The dwLevel parameter is not zero.

Other

Use FormatMessage to retrieve the system error message that corresponds to the error code returned.

 

Remarks

The server maintains a single pre-shared key for all users.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Mprapi.h

Library

Mprapi.lib

DLL

Mprapi.dll

See also

MPR_CREDENTIALSEX_1
MprAdminServerSetCredentials
Router Administration Functions
Router Management Reference

 

 

Community Additions

ADD
Show:
© 2015 Microsoft