Packet Sniffer SDK DLL Edition

HNLBAdapter :: Properties :: LbAdpGetThreadCount

 Previous Next

Returns the number of threads created for work with the loopback adapter.

Syntax:

DWORD __stdcall LbAdpGetThreadCount(HANDLE hLbAdp);

Parameters:

hLbAdp

[in] HNLBAdapter object handle.

Return values:

If the function succeeds the return value will be the number of the threads set for work with the loopback adapter, otherwise it will be 0. The default value is 1.

Description:

Use LbAdpGetThreadCount to check the number of the threads set for work with the loopback adapter.

1. Please note, that if ThreadCount is greater than 1, then OnPacketReceive event handler also may be called by more than one thread simultaneously.

2. If the ReceiveQueue property has been set before the loopback adapter opening, then while executing the code in such operating systems as NT/2000/XP/2003/Vista the ThreadCount will be greater than 1. This is due to the internal implementation of the HNLBAdapter component in the operating systems mentioned above.
ThreadCount property may be used in the Ethernet emulation mode only (see HNLBAdapter.EthEmulation[Get/Set]).
See also:HNLBAdapter, MaxThreadCount, OnPacketReceive, LbAdpSetThreadCount, LbAdpGetReceiveQueue, LbAdpSetReceiveQueue