Поделиться через


IESP::QueryStations

The QueryStations method provides a list of all computers that currently use Network Monitor to capture network data.

HRESULT STDMETHODCALLTYPE QueryStations(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 total 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 the following error code:

Return code Description
NMERR_OUT_OF_MEMORY The memory needed to process this query was 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 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

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.

See Also

QUERYTABLE, STATIONQUERY