Packet Sniffer SDK DLL Edition

HNUserFilter :: Methods :: BpfSaveToFile

 Previous Next

Saves the BPF program to the file.

Syntax:

DWORD __stdcall BpfSaveToFile(HANDLE hFtr, LPCTSTR FileName);

Parameters:

hFtr

[in] HNUserFilter object handle.

FileName

[in] A path to a file.

Return values:

HNERR_OKNo errors.
HNERR_SAVE_FILE_ERRORCannot write to a file.
HNERR_INVALID_HANDLEhFtr parameter is not the HNUserFilter object handle.

Description:

Use the BpfSaveToFile function to save the BPF program to a file. The HNUserFilter component saves the BPF program in the HN_BPF_PROGRAMM structure format. For the further working with this program use the BpfLoadFromFile function.

Requirements:

Unicode

Implemented as BpfSaveToFileW (Unicode) and BpfSaveToFileA (ANSI).

See also:HNUserFilter, HN_BPF_PROGRAMM, BpfLoadFromFile