Packet Sniffer SDK VCL Edition

HNPSManager :: Methods :: RefreshAdapterList

 Previous Next

Refreshes the internal list of the HNAdapterConfig objects.

Syntax:

function RefreshAdapterList: DWORD;

Return values:

HNERR_OKNo errors.
HNERR_ADAPTER_ALREADY_OPENEDRefreshing of the HNAdapterConfig objects internal list can be executed only if there are no adapters already opened.
HNERR_REG_OPEN_ERROROS registry reading error.

Description:

RefreshAdapterList can be used only after Initialize method has been executed successfully.

Use this method if you need to refresh the networks adapters list and/or WANMonitorState property changes. RefreshAdapterList method performs full refreshing of all adapters configurations.

Also you can trace Windows messages (e.g., WM_DEVICECHANGE) concerning with hardware configuration changes, and handle them using this method.

On executing RefreshAdapterList successfully OnConfigChange event handler is called.

See also:HNPSManager, OnConfigChange, Initialize, WANMonitorState, HNAdapterConfig