Platform SDK: Network Management |
The NetStatisticsGet function retrieves operating statistics for a service. Currently, only the workstation and server services are supported.
Only members of the Administrators or Account Operators local group can successfully execute the NetStatisticsGet function on a remote server.
NET_API_STATUS NetStatisticsGet( LPWSTR server, LPWSTR service, DWORD level, DWORD options, LPBYTE *bufptr );
Value | Meaning |
---|---|
0 | Return statistics about a workstation or a server. The bufptr parameter points to a STAT_WORKSTATION_0 or a STAT_SERVER_0 structure. |
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: Unsupported.
Header: Declared in Lmstats.h; include Lm.h.
Library: Use Netapi32.lib.
Network Management Overview, Network Management Functions, Statistics Functions, NetServerGetInfo, STAT_SERVER_0, STAT_WORKSTATION_0