MprAdminServerSetCredentials function (mprapi.h)
The MprAdminServerSetCredentials functions sets the pre-shared key for the specified server.
Syntax
DWORD MprAdminServerSetCredentials(
[in] MPR_SERVER_HANDLE hMprServer,
[in] DWORD dwLevel,
[in] LPBYTE lpbBuffer
);
Parameters
[in] hMprServer
Handle to a Windows server. Obtain this handle by calling MprAdminMIBServerConnect.
[in] dwLevel
A DWORD value that describes the format in which the information is structured in the lpbBuffer parameter. Must be zero.
[in] lpbBuffer
A pointer to an MPR_CREDENTIALSEX_1 structure that contains the pre-shared key for the server.
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 |
---|---|
|
The calling application does not have sufficient privileges. |
|
The lpbBuffer parameter is NULL. |
|
The dwLevel parameter is not zero. |
|
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.
To delete the pre-shared key, call MprAdminServerSetCredentials with the MPR_CREDENTIALSEX_1dwSize member set to zero.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | mprapi.h |
Library | Mprapi.lib |
DLL | Mprapi.dll |