Share via


IStats::QueryStatus

The QueryStatus method retrieves the status of the NPP.

HRESULT STDMETHODCALLTYPE QueryStatus(NETWORKSTATUS*pNetworkStatus);

Parameters

  • pNetworkStatus
    [out] Pointer to a returned NETWORKSTATUS structure that indicates the current state (capturing, paused, stopped, and so on) of the NPP. It is the application's responsibility to allocate and free the memory for the NETWORKSTATUS structure.

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_INVALID_PARAMETER The pNetworkStatus parameter is not pointing to a valid NETWORKSTATUS structure. Allocate memory for this structure and call the IStats::QueryStatus method again.

Remarks

This method can be called at any time after the CreateNPPInterface method is called. It can be called to see if the NPP is connected to the network, to find out the status of the current capture, and to see if any triggers are pending. Before calling this method, however, you must allocate the memory needed for the NETWORKSTATUS structure and free that memory when the structure is no longer needed.

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

CreateNPPInterface, NETWORKSTATUS