Platform SDK: Network Management |
Windows 95/98: The NetAccessCheck function verifies that a user has permission to perform a specified operation on a particular resource.
Windows NT/2000: The NetAccessCheck function is obsolete on Windows NT/Windows 2000. Win32-based applications should use the AccessCheck function.
Requires Admin privilege to successfully execute on a computer that has local security enabled.
extern API_FUNCTION NetAccessCheck( char FAR *pszReserved, char FAR *pszUserName, char FAR *pszResource, unsigned short usOperation, unsigned short FAR *pusResult );
Value | Meaning |
---|---|
ACCESS_READ | Permission to read data from a resource and, by default, to execute the resource. |
ACCESS_WRITE | Permission to write data to the resource. |
ACCESS_CREATE | Permission to create an instance of the resource (such as a file); data can be written to the resource when the resource is created. |
ACCESS_EXEC | Permission to execute the resource. |
ACCESS_DELETE | Permission to delete the resource. |
ACCESS_ATRIB | Permission to modify the resource's attributes (such as the date and time when a file was last modified). |
ACCESS_PERM | Permission to modify the permissions (read, write, create, execute, and delete) assigned to a resource for a user or application. |
ACCESS_ALL | Permission to read, write, create, execute, and delete resources, and to modify their attributes and permissions. |
ACCESS_GROUP | Permission for a particular group; this value indicates that the entry is for a group. |
ACCESS_NONE | The user does not have access to the resource. |
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.
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).
Network Management Overview, Network Management Functions, Access Functions, NetAccessEnum, NetAccessGetInfo