hAdp parameter is not the HNAdapter object handle.
Description:
Use AdpSetThreadCount before opening the network adapter (see
AdpOpenAdapter).
After the network adapter has been opened, all the operations with Packet Sniffer SDK internal driver (which
provides the direct access to the network adapter) are anyway processed by the internal thread(s).
To make the work of Packet Sniffer SDK more effective, very flexible mechanism of the
HNAdapter object fine-tuning was created: you may set the number of the
threads for working with the network adapter. ThreadCount property, depending on the task you are solving,
allows to set the optimal number of such threads.
To make the traffic capturing better, you should take in account the most important hardware configuration
characteristics of your system: CPU(s) speed, RAM size, HDD performance, and the network adapter
features.
The default value of the ThreadCount property is 1.
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. For Windows 95/98/ME this property always is set to 2, because under these operation systems PSSDK
always uses 2 threads to increase performance of packets processing and asynchronous operations. The reason
is the internal architecture of these operation systems, that doesn't allow to use several CPUs on multi-CPU
systems.
3. If the ReceiveQueue property has been set before the network 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
HNAdapter component in the operating systems mentioned above.