FltGetVolumeInformation function (fltkernel.h)

The FltGetVolumeInformation routine provides information about a given volume.

Syntax

NTSTATUS FLTAPI FltGetVolumeInformation(
  [in]  PFLT_VOLUME                     Volume,
  [in]  FILTER_VOLUME_INFORMATION_CLASS InformationClass,
  [out] PVOID                           Buffer,
  [in]  ULONG                           BufferSize,
  [out] PULONG                          BytesReturned
);

Parameters

[in] Volume

Opaque pointer for the volume. This parameter is required and cannot be NULL.

[in] InformationClass

Type of information requested. This parameter is required and must be one of the following values.

Value Meaning
FilterVolumeBasicInformation The Buffer parameter receives a FILTER_VOLUME_BASIC_INFORMATION structure for the volume.
FilterVolumeStandardInformation The Buffer parameter receives a FILTER_VOLUME_STANDARD_INFORMATION structure for the volume. This structure is available starting with Windows Vista.

[out] Buffer

Pointer to a caller-allocated buffer that receives the requested information. The type of the information returned in the buffer is defined by the InformationClass parameter. This parameter is required and cannot be NULL.

[in] BufferSize

Size, in bytes, of the buffer that the Buffer parameter points to. The caller should set this parameter according to the given InformationClass value. This parameter is required.

[out] BytesReturned

Pointer to a caller-allocated variable that receives the number of bytes returned in the buffer that Buffer points to. If the input value of BufferSize is too small, FltGetVolumeInformation returns STATUS_BUFFER_TOO_SMALL and sets this variable to the number of bytes required to store the requested information. This parameter is required and cannot be NULL.

Return value

FltGetVolumeInformation returns STATUS_SUCCESS or an appropriate NTSTATUS status code, such as one of the following:

Return code Description
STATUS_INVALID_PARAMETER
An invalid value was specified for the InformationClass parameter. For example, if FilterVolumeStandardInformation is specified on an operating system prior to Windows Vista, the routine will return STATUS_INVALID_PARAMETER. This is an error code.
STATUS_BUFFER_TOO_SMALL
The buffer that the Buffer parameter points to is not large enough to store the requested information. This is an error code.

Remarks

Given an opaque volume pointer, such as that returned by the FltEnumerateVolumes routine, the FltGetVolumeInformation routine provides information about the volume pointed to by the opaque volume pointer, passed through the Volume parameter. Note that the caller must eventually release the opaque volume pointer by calling the FltObjectDereference routine.

The FltGetVolumeInformation routine returns information for a single volume. However, given a list of opaque volume pointers, the routine can be iteratively used to create a list of corresponding volume information structures. In such a list, it is possible for two or more of the structures to contain identical volume names. For more information, see Understanding Volume Enumerations with Duplicate Volume Names.

To list volume information for all volumes that are known to the filter manager, call FltEnumerateVolumeInformation.

The following list contains related information, which may be of use:

Requirements

Requirement Value
Minimum supported client This routine is available starting with Windows Vista.
Target Platform Universal
Header fltkernel.h (include FltKernel.h)
Library FltMgr.lib
DLL Fltmgr.sys
IRQL <= APC_LEVEL

See also

FILTER_VOLUME_BASIC_INFORMATION

FILTER_VOLUME_STANDARD_INFORMATION

FLT_RELATED_OBJECTS

FltEnumerateFilters

FltEnumerateInstanceInformationByVolume

FltEnumerateInstances

FltEnumerateVolumeInformation

FltEnumerateVolumes

FltGetVolumeFromDeviceObject

FltGetVolumeFromFileObject

FltGetVolumeFromInstance

FltGetVolumeFromName