MprAdminUserSetInfo function (mprapi.h)
The MprAdminUserSetInfo function sets RAS information for the specified user.
Syntax
DWORD MprAdminUserSetInfo(
[in] LPCWSTR lpszServer,
[in] LPCWSTR lpszUser,
[in] DWORD dwLevel,
[in] const LPBYTE lpbBuffer
);
Parameters
[in] lpszServer
Pointer to a Unicode string that specifies the name of the server with the master User Accounts Subsystem (UAS). If the remote access server is part of a domain, the computer with the UAS is either the primary domain controller or the backup domain controller. If the remote access server is not part of a domain, then the server itself stores the UAS. In either case, call the MprAdminGetPDCServer function to obtain the value for this parameter.
If the server itself stores the UAS, this parameter can be NULL.
[in] lpszUser
Pointer to a Unicode string that specifies the name of the user for which to set RAS information.
[in] dwLevel
This parameter can be zero or one, corresponding to the structure type pointed to by the lpbBuffer parameter.
Windows NT Server 4.0 with SP3 and later: This parameter must be zero.
[in] lpbBuffer
Pointer to a RAS_USER_0 or RAS_USER_1 structure that specifies the new RAS information for the user.
Windows NT Server 4.0 with SP3 and later: If the dwLevel parameter specifies zero, lpbBuffer should point to a RAS_USER_0 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 values.
Value | Meaning |
---|---|
|
The caller does not have sufficient privileges. |
|
The value of dwLevel is invalid. |
|
Insufficient resources to complete the operation. |
|
The user specified by lpwsUserName does not exist on the server specified by lpwsServerName. |
Remarks
This function is available on Windows NT 4.0 if the RRAS redistributable is installed. However, the version of Mprapi.dll that ships with the RRAS redistributable exports the function as RasAdminUserSetInfo rather than MprAdminUserSetInfo. Therefore, when using the RRAS redistributable, use LoadLibrary and GetProcAddress to access this function.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | mprapi.h |
Library | Mprapi.lib |
DLL | Mprapi.dll |