Compartir a través de


2.3.2 FSCTL_CREATE_OR_GET_OBJECT_ID Reply

This message returns the results of the FSCTL_CREATE_OR_GET_OBJECT_ID request in a FILE_OBJECTID_BUFFER (section 2.1.3).

The buffer can be either Type 1 or Type 2 as follows:

  • If neither FSCTL_SET_OBJECT_ID_EXTENDED nor FSCTL_SET_OBJECT_ID has been previously issued on the file, then the buffer is of Type 1 and contains implementation-generated values as specified in section 2.1.3.1.

  • If FSCTL_SET_OBJECT_ID was used to set the object ID, then the buffer is of the type that was used during that FSCTL_SET_OBJECT_ID call.

  • If FSCTL_SET_OBJECT_ID_EXTENDED was issued to change the object ID's extended information, then the buffer is of Type 2.

There is no way for the issuer of this FSCTL to determine the returned buffer type without knowing whether the object ID was previously set or modified and by what means (FSCTL_SET_OBJECT_ID_EXTENDED or FSCTL_SET_OBJECT_ID).

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

 Error code

 Meaning

STATUS_DUPLICATE_NAME

0xC00000BD

The file has no object ID yet, and the file system is unable to generate a unique ID (to this volume).<17>

STATUS_INVALID_PARAMETER

0xC000000D

The handle is not to a file or directory, or the output buffer is not large enough to contain a FILE_OBJECTID_BUFFER structure.

STATUS_MEDIA_WRITE_PROTECTED

0xC00000A2

The volume is write-protected and changes to it cannot be made. This error code is returned even if the file already has an object ID assigned to it.

STATUS_INVALID_DEVICE_REQUEST

0xC0000010

The file system does not support the use of object IDs.