2.5.5 FileFsLabelInformation

This information class is used locally to set the label for a file system volume.

A FILE_FS_LABEL_INFORMATION data element, defined as follows, is provided by the caller.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

VolumeLabelLength

VolumeLabel (variable)

...

VolumeLabelLength (4 bytes): A 32-bit unsigned integer that contains the length, in bytes, including the trailing null, if present, of the name for the volume.<161>

VolumeLabel (variable): A variable-length Unicode field containing the name of the volume. The content of this field can be a null-terminated string, or it can be a string padded with the space character to be VolumeLabelLength bytes long.

This operation returns a status code as specified in section 2.2. Upon success, the status code returned by the function that processes this file system information class is STATUS_SUCCESS. The most common error codes are listed in the following table.

Error code

Meaning

STATUS_INFO_LENGTH_MISMATCH

0xC0000004

The specified information record length does not match the length that is required for the specified information class.