FSCTL_INVALIDATE_VOLUMES control code

The FSCTL_INVALIDATE_VOLUMES control code finds and removes all the volumes mounted on the device represented by the specified file object or handle.

To perform this operation, minifilter drivers call FltFsControlFile, and file systems, redirectors, and legacy file system filter drivers call ZwFsControlFile, using the following parameters.

Parameters

FileObject

Handle to the device. To obtain a device handle, call the CreateFile function.

FileHandle

Handle to the device. To obtain a device handle, call the CreateFile function.

FsControlCode

Control code for the operation. Use FSCTL_INVALIDATE_VOLUMES for this operation.

InputBuffer

Not used with this operation; set to NULL.

InputBufferLength

Not used with this operation; set to zero.

OutputBuffer

Not used with this operation; set to NULL.

OutputBufferLength

Not used with this operation; set to zero.

Status block

FltFsControlFile and ZwFsControlFile return STATUS_SUCCESS if the operation succeeds or an appropriate NTSTATUS value.

Remarks

FSCTL_INVALIDATE_VOLUMES is sent to the file system's control (that is, named) device object, not to a volume device object. For more information about Control Device Objects, see Creating the Control Device Object.

FAT and NTFS file systems handle surprise removal by responding to IRP_MJ_PNP/IRP_MN_SURPRISE_REMOVAL.

Requirements

Header

Ntifs.h (include Ntifs.h)

See also

FltFsControlFile
ZwFsControlFile

 

 

Send comments about this topic to Microsoft

Show: