Packet Sniffer SDK DLL Edition

HNUserFilter :: Methods :: BpfCompileBPFDefinesFromFile

 Previous Next

Compiles constants definitions from a file.

Syntax:

DWORD __stdcall BpfCompileBPFDefinesFromFile(HANDLE hFtr, LPCTSTR FileName);

Parameters:

hFtr

[in] HNUserFilter object handle.

FileName

[in] The name of a compiled file with constants definitions.

Return values:

HNERR_OKNo errors.
HNERR_LOAD_FILE_ERRORFile opening error;
HNERR_ERRORErrors occured during the compilation. To track errors use OnBPFAsmError handler.

Description:

Compiles constants definitions from a file and loads them in a component for further using.

Constants compiled by this function can be reused in the programs compiled by the functions BpfCompileBPFAsmFromFile and BpfCompileBPFAsmFromStr.

#define <definition>

<definition> can be a number, a simple arithmetic expression or a constant defined previously. Each definition should be written in a separate line.

Requirements:

Unicode

Implemented as BpfCompileBPFDefinesFromFileW (Unicode) and BpfCompileBPFDefinesFromFileA (ANSI).

See also:HNUserFilter, OnBPFAsmError, BPF instructions, BPF Assembler