FilterInstanceCreate

FilterInstanceCreate function

The FilterInstanceCreate function creates a handle that can be used to communicate with the given minifilter instance.

Syntax


HRESULT FilterInstanceCreate(
  _In_     LPCWSTR          lpFilterName,
  _In_     LPCWSTR          lpVolumeName,
  _In_opt_ LPCWSTR          lpInstanceName,
  _Out_    HFILTER_INSTANCE *hInstance
);

Parameters

lpFilterName [in]

Pointer to a null-terminated wide-character string containing the name of the minifilter that owns the instance.

lpVolumeName [in]

Pointer to a null-terminated wide-character string containing the name of the volume that the instance is attached to.

The lpVolumeName input string can be any of the following. The trailing backslash (\) is optional.

  • A drive letter, such as "D:\"

  • A path to a volume mount point, such as "c:\mnt\edrive\"

  • A unique volume identifier (also called a volume GUID name), such as "\??\Volume{7603f260-142a-11d4-ac67-806d6172696f}\"

  • A nonpersistent device name (also called a target name or an NT device name), such as "\Device\HarddiskVolume1\"

lpInstanceName [in, optional]

Pointer to a null-terminated wide-character string containing the instance name for the instance. This parameter is optional and can be NULL. If it is NULL, the first instance found for this minifilter on this volume is returned.

hInstance [out]

Pointer to a caller-allocated variable that receives an opaque handle for the minifilter instance if the call to FilterInstanceCreate succeeds; otherwise, it receives INVALID_HANDLE_VALUE.

Return value

FilterInstanceCreate returns S_OK if successful. Otherwise, it returns an error value.

Remarks

A user-mode application calls FilterInstanceCreate to create a handle that can be used to communicate with a kernel-mode minifilter instance. The returned instance handle can be passed as a parameter to functions such as FilterInstanceGetInformation.

To close an instance handle returned by FilterInstanceCreate, call FilterInstanceClose.

Requirements

Target platform

Universal

Header

Fltuser.h (include Fltuser.h)

Library

FltLib.lib

DLL

FltLib.dll

See also

FilterInstanceClose
FilterInstanceGetInformation

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft