FilterDetach function

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

Syntax


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

Parameters

lpFilterName [in]

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 [in]

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 [in, optional]

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

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft