Expand Minimize

FltGetVolumeInformation routine

The FltGetVolumeInformation routine provides information about a given volume.

Syntax


NTSTATUS FltGetVolumeInformation(
  _In_   PFLT_VOLUME Volume,
  _In_   FILTER_VOLUME_INFORMATION_CLASS InformationClass,
  _Out_  PVOID Buffer,
  _In_   ULONG BufferSize,
  _Out_  PULONG BytesReturned
);

Parameters

Volume [in]

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

InformationClass [in]

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

ValueMeaning

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.

 

Buffer [out]

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.

BufferSize [in]

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.

BytesReturned [out]

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 codeDescription
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

Version

This routine is available starting with Windows Vista.

Header

Fltkernel.h (include FltKernel.h)

Library

FltMgr.lib

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

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft