Redigera

Dela via


IStats::QueryStations method

The QueryStations method provides a list of all computers who are currently capturing data using Network Monitor.

Syntax

HRESULT STDMETHODCALLTYPE QueryStations(
  [in, out] QUERYTABLE *lpQueryTable
);

Parameters

lpQueryTable [in, out]

Pointer to a QUERYTABLE structure. On input, this structure must contain the maximum number of computers you want Network Monitor to return and an array of STATIONQUERY structures.

On output, this structure returns the number of computers that are capturing data and a STATIONQUERY structure for each computer found. Note that this information may include computers using versions of Network Monitor that predate version 2.0.

Return value

If the method is successful, the return value is NMERR_SUCCESS.

If the method is unsuccessful, the return value is the following error code:

Return code Description
NMERR_OUT_OF_MEMORY
The memory required to process this query was unavailable.

Remarks

This method can be called at any time after CreateNPPInterface is called. A call to this method is a synchronous call, which may take several seconds to complete as Network Monitor waits for remote computers to respond to the query. Only computers on the local subnet can be queried.

It is your responsibility to allocate the memory for the QUERYTABLE structure and free that memory after the table is no longer needed. This requirement includes the memory needed for the STATIONQUERY array used in QUERYTABLE.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
Netmon.h
DLL
Ndisnpp.dll;
Rmtnpp.dll

See also

IStats

QUERYTABLE

STATIONQUERY