IRTC::QueryStations
The QueryStations method provides a list of all computers currently using Network Monitor to capture network data.
HRESULT STDMETHODCALLTYPE QueryStations(QUERYTABLE*lpQueryTable);
Parameters
lpQueryTable
[in, out] A 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 capturing data and a STATIONQUERY structure for each computer found. Be aware that this may include computers using versions of Network Monitor that predate version 2.0.
Return Values
If the method is successful, the return value is NMERR_SUCCESS.
If the method is unsuccessful, the return value is one of the following error codes:
Return code | Description |
---|---|
NMERR_OUT_OF_MEMORY | The memory required to process this query is unavailable. |
Remarks
This method can be called at any time after the CreateNPPInterface method is called. A call to this method is a synchronous call, which may take several seconds to complete while Network Monitor waits for remote computers to respond to the query. Only computers on the local subnet can be queried.
The user must allocate the memory for the QUERYTABLE structure and free that memory after the table is no longer required. This requirement includes memory needed for the STATIONQUERY array used in QUERYTABLE.
Requirements
Client | Requires Windows XP, Windows 2000 Professional, or Windows NT Workstation 4.0. |
Server | Requires Windows Server 2003, Windows 2000 Server, or Windows NT Server 4.0. |
Header | Declared in Netmon.h. |
DLL | Requires Ndisnpp.dll. Requires Rmtnpp.dll. |