NetStatisticsGet2

NetStatisticsGet2 retrieves operating statistics for a service. Currently, only the Workstation and Server services are supported.

Security Requirements

Only members of the Administrators or Account Operators local group can successfully execute NetStatisticsGet2 on a remote server.

NET_API_STATUS NetStatisticsGet2(
  LPWSTR server,  
  LPWSTR service, 
  DWORD level,    
  DWORD options,  
  LPBYTE *bufptr  
);
 

Parameters

server
Pointer to a Unicode string that contains the name of the server on which to execute NetStatisticsGet2. A NULL pointer or null string specifies the local computer.
service
Pointer to a Unicode string that contains the name of the service about which to get the statistics. Only the values SERVER and WORKSTATION are currently allowed.
level
Specifies the following value to return the level of information provided.
Value Meaning
0 The bufptr parameter points to an array of STAT_WORKSTATION_0 or STAT_SERVER_0 structures.

options
Must be zero.
bufptr
Pointer to the buffer in which the data set with the level parameter is stored.

QuickInfo

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

See Also

Networking (Net) Overview, Net Functions, NetServerGetInfo, STAT_SERVER_0, STAT_WORKSTATION_0