Bewerken

Delen via


FILE_FS_OBJECTID_INFORMATION structure (ntddk.h)

The FILE_FS_OBJECTID_INFORMATION structure is used to query or set the object ID for a file system volume.

Syntax

typedef struct _FILE_FS_OBJECTID_INFORMATION {
  UCHAR ObjectId[16];
  UCHAR ExtendedInfo[48];
} FILE_FS_OBJECTID_INFORMATION, *PFILE_FS_OBJECTID_INFORMATION;

Members

ObjectId[16]

A 16-byte GUID that identifies the file system volume on the disk.

ExtendedInfo[48]

A 48-byte value containing optional, additional caller-defined information on the file system volume. The meaning of this extended information is opaque to the file system.

Remarks

This information can be queried in either of the following ways:

  • Call FltQueryVolumeInformation or ZwQueryVolumeInformationFile, passing FileFsObjectIdInformation as the value of FileInformationClass and passing a caller-allocated, FILE_FS_OBJECTID_INFORMATION-structured buffer as the value of FileInformation.
  • Create an IRP with major function code IRP_MJ_QUERY_VOLUME_INFORMATION.

No specific access rights are required to query this information. Thus this information is available as long as the volume is accessed through an open handle to the volume itself, or to a file or directory on the volume.

This information can be set in either of the following ways:

  • Call FltSetVolumeInformation or ZwSetVolumeInformationFile, passing FileFsObjectIdInformation as the value of FileInformationClass and passing a caller-allocated, FILE_FS_OBJECTID_INFORMATION-structured buffer as the value of FileInformation.
  • Create an IRP with major function code IRP_MJ_SET_VOLUME_INFORMATION.

FILE_WRITE_DATA access to the volume is required to set this information.

Support for volume object IDs is file-system-specific. In NTFS, volume object IDs are used extensively by the distributed link tracking service.

It is important to note that the volume object ID is not the same as the volume GUID. The volume object ID is assigned to the file system volume by the file system. The volume GUID, or unique volume name, is file system-independent; it is assigned to the underlying storage volume by the Volume Mount Manager.

To get the volume GUID for a volume, use the Win32 GetVolumeNameForVolumeMountPointW function or the FltGetVolumeGuidName routine.

The size of the buffer passed in the FileInformation parameter to FltQueryVolumeInformation, FltSetVolumeInformation, ZwQueryVolumeInformationFile, or ZwSetVolumeInformationFile must be at least sizeof (FILE_FS_OBJECTID_INFORMATION).

This structure must be aligned on a LONGLONG (8-byte) boundary.

Requirements

Requirement Value
Header ntddk.h (include Ntddk.h, Ntifs.h, Fltkernel.h)

See also

FltGetVolumeGuidName

FltQueryVolumeInformation

FltSetVolumeInformation

IRP_MJ_QUERY_VOLUME_INFORMATION

IRP_MJ_SET_VOLUME_INFORMATION

ZwQueryVolumeInformationFile

ZwSetVolumeInformationFile