Packet Sniffer SDK DLL Edition

HNFileAdapter :: Events :: FAdpSetOnThreadEnd

 Previous Next

Sets the address and the parameter value for the OnThreadEnd event handler (see HNFN_THREADEND).

Syntax:

FARPROC __stdcall FAdpSetOnThreadEnd(HANDLE hFAdp, FARPROC pfOnThreadEnd, DWORD_PTR Param);

Parameters:

hFAdp

[in] HNFileAdapter object handle.

pfOnThreadEnd

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

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

Description:

Use FAdpSetOnThreadEnd to set the address and the parameter value for the OnThreadEnd event handler. This event handler is called in the context of the internal component thread, when HNFileAdapter is working in the automatic mode (see AutoMode [Get/Set]).

This event may be fired while FAdpCloseFile has been executed executed, in case of correct completion of a CAP file reading, or in case of CAP file read/write error.

See also:HNFileAdapter, HNFN_THREADEND, FAdpCloseFile, FAdpGetAutoMode, FAdpSetAutoMode