Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 1.65 KB

File metadata and controls

67 lines (45 loc) · 1.65 KB

Home

Function name : NetUserGetInfo

Group: Network Management - Library: netapi32


Retrieves information about a particular user account on a server.


Code examples:

Adding and deleting User Accounts
Finding out if the current user is the Guest account

Declaration:

NET_API_STATUS NetUserGetInfo(
  LPCWSTR servername,
  LPCWSTR username,
  DWORD level,
  LPBYTE* bufptr
);
  

FoxPro declaration:

DECLARE INTEGER NetUserGetInfo IN netapi32;
	STRING    servername,;
	STRING    username,;
	INTEGER   lvl,;
	INTEGER @ bufptr
  

Parameters:

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 return information.

level [in] Specifies the information level of the data.

bufptr [out] Pointer to the buffer that receives the data.


Return value:

If the function succeeds, the return value is NERR_Success (0).


Comments:

Important: the bufptr is allocated by the system and must be freed using the NetApiBufferFree function.

See also: NetUserSetInfo, NetUserGetGroups, NetUserEnum.