Packet Sniffer SDK VCL Edition

HNPSManager :: Methods :: Get_NextAdapterCfg

 Previous Next

Returns the handle of the next HNAdapterConfig object.

Syntax:

function Get_NextAdapterCfg(hCfg: Pointer): Pointer;

Parameters:

hCfg

[in] The handle of the previous HNAdapterConfig object.

Return values:

After this method 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:

Get_NextAdapterCfg can be used only after Initialize method is executed successfully. Use Get_NextAdapterCfg method to gain access to all the HNAdapterConfig objects. Use Get_FirstAdapterCfg 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
hCfg := HNPSManager.Get_FirstAdapterCfg(); 
while(hCfg <> 0) do 
 begin 
   // get access to the HNAdapterConfig methods and properties
   ... 
   // get the next HNAdapterConfig object handle
   hCfg := HNPSManager.Get_NextAdapterCfg(hCfg); 
 end;
See also:HNPSManager, Initialize, RefreshAdapterList, Get_FirstAdapterCfg