FilterDetach function

The FilterDetach function detaches the given minifilter instance from the given volume.

Syntax

HRESULT FilterDetach(
  LPCWSTR lpFilterName,
  LPCWSTR lpVolumeName,
  LPCWSTR lpInstanceName
);

Parameters

lpFilterName

Pointer to a null-terminated wide-character string containing the name of the minifilter whose instance is to be detached from the stack. This parameter is required and cannot be NULL.

lpVolumeName

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

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\"
This parameter is required and cannot be NULL.

lpInstanceName

Pointer to a null-terminated wide-character string containing the instance name for the instance to be removed. This parameter is optional and can be NULL. If it is NULL, the highest matching instance is removed.

Return Value

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

Remarks

FilterDetach is the Win32 equivalent of FltDetachVolume.

FilterDetach detaches a minifilter instance from a volume and tears down the instance.

To attach a minifilter instance to a volume, call FilterAttach or FilterAttachAtAltitude.

Requirements

   
Target Platform Universal
Header fltuser.h (include Fltuser.h)
Library FltLib.lib
DLL FltLib.dll

See Also

FilterAttach

FilterAttachAtAltitude

FltDetachVolume