Packet Sniffer SDK DLL Edition

HNLBAdapter :: Events :: LbAdpSetOnDisconnect

 Previous Next

Sets the address and the parameter value for the OnDisconnect event handler (see HNFN_LBDISCONNECT).

Syntax:

FARPROC __stdcall LbAdpSetOnDisconnect(HANDLE hLbAdp, FARPROC pfOnDisconnect, DWORD_PTR Param);

Parameters:

hLbAdp

[in] HNLBAdapter object handle.

pfOnDisconnect

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

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

Description:

Use LbAdpSetOnDisconnect to set the address and the parameter value for the OnDisconnect event handler. OnDisconnect event handler is called by HNLBAdapter component when an application closes connection to a remote server, or a remote server closes connection to application.

See also:HNLBAdapter, HNFN_LBDISCONNECT