Compartir a través de


2.4.44 FileShortNameInformation

This information class is used to change a file's short name. If the supplied name is of zero length, the file's existing short name, if any, SHOULD<144> be deleted. Otherwise, the supplied name MUST be a valid short name as specified in section 2.1.5.2.1 and be unique among all file names and short names in the same directory as the file being operated on. A caller changing the file's short name MUST have SeRestorePrivilege, as specified in [MS-LSAD] section 3.1.1.2.1.

A FILE_NAME_INFORMATION (section 2.1.7) data element containing an 8.3 file name (section 2.1.5.2.1) is provided by the client.

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 information class is STATUS_SUCCESS. The most common error codes are listed in the following table.

Error code

Meaning

STATUS_MEDIA_WRITE_PROTECTED

0xC00000A2

The target cannot be written to because it is write-protected.

STATUS_INVALID_PARAMETER

0xC000000D

The file name is not a valid parameter.

STATUS_ACCESS_DENIED

0xC0000022

The handle was not opened to write file data or file attributes, or the file has been deleted.

STATUS_PRIVILEGE_NOT_HELD

0xC0000061

The SeRestorePrivilege privilege is not held.

STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME

0xC000019F

Short names are not enabled on this volume.

STATUS_OBJECT_NAME_COLLISION

0xC0000035

The specified name already exists.

STATUS_INFO_LENGTH_MISMATCH

0xC0000004

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