The NetWkstaGetInfo function returns information about the configuration elements for a workstation.
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
);
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. |
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. |
Windows NT: Requires version 3.1 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in lmwksta.h.
Import Library: Use netapi32.lib.
Networking (Net) Overview, Net Functions, NetWkstaSetInfo