Packet Sniffer SDK DLL Edition

HNTcpManager :: Events :: TcpMgrSetOnCreate

 Previous Next

Sets the address and the parameter value for the OnSessionCreate event handler (see HNFN_TCPCREATE).

Syntax:

FARPROC __stdcall TcpMgrSetOnCreate(HANDLE hTcpMgr, FARPROC pfOnCreate, DWORD_PTR Param);

Parameters:

hTcpMgr

[in] HNTcpManager object handle.

pfOnCreate

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

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

Description:

Use TcpMgrSetOnCreate to set the address and the parameter value for the OnSessionCreate event handler. OnSessionConnect event handler is executed in the context of a thread, which has called TcpMgrProcessPacket function.

See also:HNTcpManager, HNFN_TCPCREATE, TcpMgrProcessPacket