Export (0) Print
Expand All

FSCTL_QUERY_PERSISTENT_VOLUME_STATE control code

The FSCTL_QUERY_PERSISTENT_VOLUME_STATE control code retrieves persistent settings for a file system volume. Persistent settings remain on a file system volume between reboots of the computer.

To perform this operation, call FltFsControlFile or ZwFsControlFile with the following parameters.

Parameters

FileObject

FltFsControlFile only. A file object pointer for the file system volume. This parameter is required and cannot be NULL.

FileHandle

ZwFsControlFile only. A file handle for the file system volume. This parameter is required and cannot be NULL.

FsControlCode

The control code for the operation. Use FSCTL_QUERY_PERSISTENT_VOLUME_STATE for this operation.

InputBuffer

A pointer to a caller-allocated FILE_FS_PERSISTENT_VOLUME_INFORMATION structure.

InputBufferLength

The size, in bytes, of the buffer pointed to by the InputBuffer parameter.

OutputBuffer

A pointer to a caller-allocated FILE_FS_PERSISTENT_VOLUME_INFORMATION structure that receives the persistent settings for a file system volume.

OutputBufferLength

The size, in bytes, of the buffer pointed to by the OutputBuffer parameter.

Return Value

FltFsControlFile or ZwFsControlFile returns STATUS_SUCCESS or an appropriate NTSTATUS value such as one of the following:

STATUS_NOT_SUPPORTED

The caller specified an incorrect version number in the Version member of FILE_FS_PERSISTENT_VOLUME_INFORMATION.

STATUS_INVALID_PARAMETER

The file system volume is not an open user volume, or the caller specified an invalid flag in the FlagMask member of FILE_FS_PERSISTENT_VOLUME_INFORMATION.

STATUS_BUFFER_TOO_SMALL

The buffer that the InputBuffer parameter points to is not large enough (that is, the buffer is less than sizeof(FILE_FS_PERSISTENT_VOLUME_INFORMATION)). In this case, no persistent-settings data is returned. This is an error code.

STATUS_ACCESS_DENIED

The caller cannot access the file system volume.

STATUS_VOLUME_DISMOUNTED

The file system volume is dismounted.

STATUS_TOO_LATE

The file system volume is shut down.

STATUS_MEDIA_WRITE_PROTECTED

The file system volume is read only.

Requirements

Version

Available starting with Windows 7.

Header

Ntifs.h (include Ntifs.h)

See also

FILE_FS_PERSISTENT_VOLUME_INFORMATION
FltFsControlFile
ZwFsControlFile

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft