NetWkstaGetInfo

The NetWkstaGetInfo function returns information about the configuration elements for a workstation.

Security Requirements

You must have Print or Server operator privilege, or be a member of the Administrator or Account local groups to successfully execute NetWkstaGetInfo at level 0 or level 1 on a remote server. No special privilege is required for level 10 calls.

NET_API_STATUS NetWkstaGetInfo(
  LPWSTR servername,  
  DWORD level,        
  LPBYTE *bufptr      
);
 

Parameters

servername
Pointer to a Unicode string containing the name of the remote server on which the function is to execute. A NULL pointer or string specifies the local computer.
level
Specifies one of the following values to return the level of information provided.
Value Meaning
100 The bufptr parameter points to a WKSTA_INFO_100 structure.
101 The bufptr parameter points to a WKSTA_INFO_101 structure.
102 The bufptr parameter points to a WKSTA_INFO_102 structure.
302 The bufptr parameter points to a WKSTA_INFO_302 structure.
402 The bufptr parameter points to an WKSTA_INFO_402 structure.
502 The bufptr parameter points to a WKSTA_INFO_502 structure. It is not advisable to change the values of WKSTA_INFO_502.

bufptr
Pointer to the buffer in which the data set with the level parameter is stored.

Return Values

If the function is successful, it returns NERR_SUCCESS.

If the function fails, the return value is one of the following error codes.

Value Meaning
ERROR_ACCESS_DENIED The user does not have access to the requested information.
ERROR_INVALID_LEVEL The level parameter, which indicates what level of data structure information is available, is invalid.

QuickInfo

  Windows NT: Requires version 3.1 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in lmwksta.h.
  Import Library: Use netapi32.lib.

See Also

Networking (Net) Overview, Net Functions, NetWkstaSetInfo