Group: Network Management - Library: netapi32
Adding and deleting User Accounts
NET_API_STATUS NetUserSetInfo(
LPCWSTR servername,
LPCWSTR username,
DWORD level,
LPBYTE buf,
LPDWORD parm_err
); DECLARE INTEGER NetUserSetInfo IN netapi32;
STRING servername,;
STRING username,;
INTEGER lvl,;
STRING @ buf,;
INTEGER parm_err
servername [in] Pointer to a constant string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used.
username [in] Pointer to a constant string that specifies the name of the user account for which to set information.
level [in] Specifies the information level of the data.
buf [in] Pointer to the buffer that specifies the data. The format of this data depends on the value of the level parameter.
parm_err [out] Pointer to a value that receives the index of the first member of the user information structure that causes ERROR_INVALID_PARAMETER.
If the function succeeds, the return value is NERR_Success (0).
Only users or applications having administrative privileges can call the NetUserSetInfo function to change a user"s password.
See also: NetUserGetInfo, NetUserAdd, NetUserDel, NetUserChangePassword.
Home