Packet Sniffer SDK DLL Edition

HNFileAdapter :: Events :: FAdpSetOnPacketRecv

 Previous Next

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

Syntax:

FARPROC __stdcall FAdpSetOnPacketRecv(HANDLE hFAdp, FARPROC pfOnPacketReceive, DWORD_PTR Param);

Parameters:

hFAdp

[in] HNFileAdapter 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 FAdpSetOnPacketRecv to set the address and the parameter value for the OnPacketReceive event handler. This event handler is called immediately after reading a packet from CAP file.

See also:HNFileAdapter, HNFN_PKTRECEIVE