Packet Sniffer SDK VCL Edition

HNAdapter :: Methods :: UpdateAdapterStatistics

 Previous Next

Updates the network adapter statistics synchronously.

Syntax:

function UpdateAdapterStatistics: DWORD;

Return values:

HNERR_OKAdapter statistics has been updated successfully.
HNERR_ADAPTER_NOT_OPENEDNetwork adapter has not been opened, see OpenAdapter.
HNERR_ADAPTER_REQ_ERRAn internal driver request error.

Description:

After the network adapter has been opened successfully by OpenAdapter method, you can use UpdateAdapterStatistics method to update network adapter statistics created by the operation system.

To obtain corresponding values use the following methods: Get_TranWithoutErr, Get_RecvWithoutErr, Get_TranWithErr, Get_RecvWithErr, Get_Missed.

If this method fails, the values of internal counters of the network adapter in the HNAdapter component aren't defined (contain garbage).
See also:Packets processing diagram, HNAdapter, OpenAdapter, Get_TranWithoutErr, Get_RecvWithoutErr, Get_TranWithErr, Get_RecvWithErr, Get_Missed