Bewerken

Delen via


FltQueryVolumeInformation function (fltkernel.h)

The FltQueryVolumeInformation routine retrieves information about the volume that the given instance is attached to.

Syntax

NTSTATUS FLTAPI FltQueryVolumeInformation(
  [in]  PFLT_INSTANCE        Instance,
  [out] PIO_STATUS_BLOCK     Iosb,
  [out] PVOID                FsInformation,
  [in]  ULONG                Length,
  [in]  FS_INFORMATION_CLASS FsInformationClass
);

Parameters

[in] Instance

An opaque instance pointer for a minifilter driver instance that is attached to the volume.

[out] Iosb

A pointer to caller-allocated IO_STATUS_BLOCK structure that receives the final completion status and information about the query operation. For successful calls that return data, the number of bytes written to the FsInformation buffer is returned in the structure's Information member.

[out] FsInformation

A pointer to a caller-allocated buffer that receives the desired information about the volume. The structure of the information returned in the buffer is defined by the FsInformationClass parameter.

[in] Length

The size in bytes of the buffer that FsInformation points to. The caller should set this parameter according to the given FsInformationClass. For example, if the value of FsInformationClass is FileFsControlInformation, Length must be at least sizeof(FILE_FS_CONTROL_INFORMATION).

[in] FsInformationClass

The type of information requested. One of the following value.

Value Meaning
FileFsAttributeInformation
Return a FILE_FS_ATTRIBUTE_INFORMATION structure containing attribute information about the file system responsible for the volume.
FileFsControlInformation
Return a FILE_FS_CONTROL_INFORMATION structure containing file system control information about the volume.
FileFsDeviceInformation
Return a FILE_FS_DEVICE_INFORMATION structure containing device information for the volume.
FileFsDriverPathInformation
Return a FILE_FS_DRIVER_PATH_INFORMATION structure containing information about whether a specified driver is in the I/O path for the volume. The caller must store the name of the driver into the FILE_FS_DRIVER_PATH_INFORMATION structure before calling FltQueryVolumeInformation.
FileFsFullSizeInformation
Return a FILE_FS_FULL_SIZE_INFORMATION structure containing information about the total amount of space available on the volume.
FileFsObjectIdInformation
Return a FILE_FS_OBJECTID_INFORMATION structure containing file system-specific object ID information for the volume. Be aware that this is not the same as the (GUID-based) unique volume name assigned by the operating system.
Note  This value is not valid for snapshot volumes.
 
FileFsSizeInformation
Return a FILE_FS_SIZE_INFORMATION structure containing information about the amount of space on the volume that is available to the user associated with the calling thread.
FileFsVolumeInformation
Return a FILE_FS_VOLUME_INFORMATION containing information about the volume such as the volume label, serial number, and creation time.
FileFsSectorSizeInformation
Return a FILE_FS_SECTOR_SIZE_INFORMATION structure that contains information about the physical and logical sector sizes of a volume.

Return value

The FltQueryVolumeInformation routine returns STATUS_SUCCESS or an appropriate NTSTATUS value such as one of the following:

Return code Description
STATUS_INSUFFICIENT_RESOURCES

FltQueryVolumeInformation encountered a pool allocation failure. This is an error code.

STATUS_INVALID_INFO_CLASS
An invalid value was specified for FsInformationClass. This is an error code.
STATUS_INVALID_PARAMETER
The Instance is attached to a network volume. FltQueryVolumeInformation cannot be used to query network volume information. This is an error code.

Remarks

Fields in the FILE_XXX_INFORMATION structure that are not supported by the underlying file system are set to zero.

To change information about a volume, call FltSetVolumeInformation.

To get volume property information for the given volume, call FltGetVolumeProperties.

To get the volume name for a given volume, call FltGetVolumeName.

To get the volume GUID name for a given volume, call FltGetVolumeGuidName.

Requirements

Requirement Value
Minimum supported client Available and supported in Microsoft Windows 2000 Update Rollup 1 for SP4, Windows XP with Service Pack 2 (SP2), Windows Server 2003 SP1 and later Windows operating systems. Not available or supported in Windows 2000 SP4 and earlier Windows operating systems.
Target Platform Universal
Header fltkernel.h (include FltKernel.h)
Library FltMgr.lib
DLL Fltmgr.sys
IRQL PASSIVE_LEVEL

See also

FILE_FS_ATTRIBUTE_INFORMATION

FILE_FS_CONTROL_INFORMATION

FILE_FS_DEVICE_INFORMATION

FILE_FS_DRIVER_PATH_INFORMATION

FILE_FS_FULL_SIZE_INFORMATION

FILE_FS_OBJECTID_INFORMATION

FILE_FS_SECTOR_SIZE_INFORMATION

FILE_FS_SIZE_INFORMATION

FILE_FS_VOLUME_INFORMATION

FltGetVolumeGuidName

FltGetVolumeName

FltGetVolumeProperties

FltSetVolumeInformation