FilterLoad function (fltuser.h)
The FilterLoad function dynamically loads a minifilter driver into the system.
Syntax
HRESULT FilterLoad(
[in] LPCWSTR lpFilterName
);
Parameters
[in] lpFilterName
Pointer to a null-terminated wide-character string that specifies the service name of the minifilter driver. This parameter is required and cannot be NULL or an empty string.
Return value
FilterLoad returns S_OK if successful. Otherwise, it returns one of the following error values:
Return code | Description |
---|---|
|
The minifilter driver is already running. |
|
No matching minifilter driver was found. |
|
The minifilter driver is already running. |
|
The load image for the minifilter driver specified by lpFilterName is invalid. |
|
The load image for the minifilter driver specified by lpFilterName is invalid. |
|
The minifilter driver has an invalid digital signature. |
Remarks
FilterLoad is the Win32 equivalent of FltLoadFilter.
A user-mode application that has a dependency on a kernel-mode minifilter driver can load the minifilter driver by calling FilterLoad.
Callers of FilterLoad must have SeLoadDriverPrivilege (the LUID of SE_LOAD_DRIVER_PRIVILEGE) to load or unload a minifilter driver. This privilege is named by the SE_LOAD_DRIVER_NAME name constant. (Privileges are described in the Microsoft Windows Software Development Kit (SDK) for Windows 7 and .NET Framework 4.0 documentation.)
To unload the minifilter driver, call FilterUnload.
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Header | fltuser.h (include Fltuser.h) |
Library | FltLib.lib |
DLL | FltLib.dll |