Packet Sniffer SDK DLL Edition

HNFileAdapter :: Events :: FAdpSetOnFileClose

 Previous Next

Sets the address and the parameter value for the OnFileClose event handler (see HNFN_FILECLOSE).

Syntax:

FARPROC __stdcall FAdpSetOnFileClose(HANDLE hFAdp, FARPROC pfOnFileClose, DWORD_PTR Param);

Parameters:

hFAdp

[in] HNFileAdapter object handle.

pfOnFileClose

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

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

Description:

Use FAdpSetOnFileClose to set the address and the parameter value for the OnFileClose event handler. OnFileClose is called in the context of the internal component thread, when HNFileAdapter is working in the automatic mode (see AutoMode [Get/Set]) in case of correct completion of a CAP file reading, or in case of CAP file read/write error.

FAdpCloseFile function call doesn't cause triggering of OnFileClose.
See also:HNFileAdapter, HNFN_THREADEND, FAdpGetAutoMode, FAdpSetAutoMode, FAdpCloseFile