Platform SDK: Network Management

NetAccessGetUserPerms

Windows 95/98: The NetAccessGetUserPerms function returns a specified user's or group's access permissions for a particular resource.

Windows NT/2000: The NetAccessGetUserPerms function is obsolete on Windows NT/Windows 2000. Win32-based applications should use the GetFileSecurity and SetFileSecurity functions.

Security Requirements

Requires Admin privilege to successfully execute on a computer that has local security enabled. When users request their own access permissions no special privilege is required.

extern API_FUNCTION
 NetAccessGetUserPerms(
  char FAR * pszServer, 
  char FAR * pszUgName, 
  char FAR * pszResource, 
  unsigned short FAR * pusPerms 
);

Parameters

pszServer
Pointer to a string specifying the name of the remote server on which the function is to execute. The string must begin with \\. If this parameter is NULL, the local computer is used.
pszUgName
Pointer to a string specifying the name of the user or group to query.
pszResource
Pointer to a string that contains the name of the network resource to query.
pusPerms
Pointer to an unsigned short integer that receives the user permissions for the specified resource.

Return Values

If the function succeeds, the return value is NERR_Success.

If the function fails, the return value is a Win32 API error code. For a list of error codes, see Error Codes.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Lmaccess.h (Windows NT/2000) or Svrapi.h (Windows 95/98); include Lm.h (Windows NT/2000).
  Library: Use Netapi32.lib (Windows NT/2000) or Svrapi.lib (Windows 95/98).

See Also

Network Management Overview, Network Management Functions, Access Functions, NetAccessGetInfo, NetAccessEnum