Packet Sniffer SDK DLL Edition

HNLBAdapter :: Events :: LbAdpSetOnPacketRecv

 Previous Next

Sets the address and the parameter value for the OnPacketReceive event handler (see HNFN_PKTRECEIVE).

Syntax:

FARPROC __stdcall LbAdpSetOnPacketRecv(HANDLE hLbAdp, FARPROC pfOnPacketReceive, DWORD_PTR Param);

Parameters:

hLbAdp

[in] HNLBAdapter object handle.

pfOnPacketReceive

[in] Event handler function address. This function must be declared as HNFN_PKTRECEIVE.

Param

[in] Event handler parameter. This parameter is sent to the event handler each time it is called.

Return values:

If the function succeeds the return value will be the value of the pfOnPacketReceive parameter.

Description:

Use LbAdpSetOnPacketRecv to set the address and the parameter value for the OnPacketReceive event handler. This event handler is called immediately after its internal driver has received a packet and transferred it to the application.

OnPacketReceive event may be used in the Ethernet emulation mode only (see HNLBAdapter.EthEmulation[Get/Set]).
See also:HNLBAdapter, HNFN_PKTRECEIVE