Packet Sniffer SDK DLL Edition

HNPSManager :: Methods :: MgrGetNextAdapterCfg

 Previous Next

Returns the handle of the next HNAdapterConfig object.

Syntax:

HANDLE __stdcall MgrGetNextAdapterCfg(HANDLE hMgr, HANDLE hCfg);

Parameters:

hMgr

[in] HNPSManager object handle.

hCfg

[in] The handle of the previous HNAdapterConfig object.

Return values:

After this function has been executed successfully the returned value is HNAdapterConfig object handle. If the hCfg parameter points to the last HNAdapterConfig object, the returned value will be NULL.

Description:

MgrGetNextAdapterCfg can be used only after MgrInitialize function is executed successfully. Use MgrGetNextAdapterCfg function to gain access to all the HNAdapterConfig objects. Use MgrGetFirstAdapterCfg to get access to the first HNAdapterConfig object.

To enumerate all HNAdapterConfig objects created by PSSDK for all network adapters, found on the system, do the following:

// get the first HNAdapterConfig object handle
HANDLE hCfg = MgrGetFirstAdapterCfg(hMgr); 
do 
 { 
   // get access to the HNAdapterConfig methods and properties
   ... 
 } 
// get the next HNAdapterConfig object handle
while ((hCfg = MgrGetNextAdapterCfg(hMgr,hCfg)) != 0);
// get the first HNAdapterConfig object handle
hCfg := MgrGetFirstAdapterCfg(hMgr); 
while(hCfg <> 0) do 
 begin 
   // get access to the HNAdapterConfig methods and properties
   ... 
   // get the next HNAdapterConfig object handle
   hCfg := MgrGetNextAdapterCfg(hMgr,hCfg); 
 end;
See also:HNPSManager, MgrInitialize, MgrRefreshAdapterList, MgrGetFirstAdapterCfg