Packet Sniffer SDK DLL Edition

HNAdapter :: Events :: AdpSetOnPacketRecv

 Previous Next

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

Syntax:

FARPROC __stdcall AdpSetOnPacketRecv(HANDLE hAdp, FARPROC pfOnPacketReceive, DWORD_PTR Param);

Parameters:

hAdp

[in] HNAdapter 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 AdpSetOnPacketRecv 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.

See also:HNAdapter, HNFN_PKTRECEIVE