Packet Sniffer SDK DLL Edition

HNTcpManager :: Events :: TcpMgrSetOnReturn

 Previous Next

Sets the address and the parameter value for the OnPacketReturn event handler (see HNFN_TCPRETURN).

Syntax:

FARPROC __stdcall TcpMgrSetOnReturn(HANDLE hTcpMgr, FARPROC pfOnReturn, DWORD_PTR Param);

Parameters:

hTcpMgr

[in] HNTcpManager object handle.

pfOnReturn

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

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 pfOnReturn parameter.

Description:

Use TcpMgrSetOnReturn to set the address and the parameter value for the OnPacketReturn event handler. This event handler is called in the context of a thread, which has called TcpMgrProcessPacket function.

See also:HNTcpManager, HNFN_TCPRETURN, TcpMgrProcessPacket