FSCTL_SET_OBJECT_ID_EXTENDED - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// winioctl.h

// CTL_CODE(0x0009, 0x02f, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSCTL_SET_OBJECT_ID_EXTENDED 0x000900BC
View the official Win32 API reference

NtDoc

No description available.

Win32 API reference (ni-winioctl-fsctl_set_object_id_extended)

FSCTL_SET_OBJECT_ID_EXTENDED IOCTL

Description

Modifies user data associated with the object identifier for the specified file or directory.

To perform this operation, call the DeviceIoControl function with the following parameters.

BOOL DeviceIoControl(
  (HANDLE) hDevice,                 // handle to device
  FSCTL_SET_OBJECT_ID_EXTENDED,     // dwIoControlCode
  (LPVOID) lpInBuffer,              // input buffer
  (DWORD) nInBufferSize,            // size of input buffer
  NULL,                             // lpOutBuffer
  0,                                // nOutBufferSize
  (LPDWORD) lpBytesReturned,        // number of bytes returned
  (LPOVERLAPPED) lpOverlapped       // OVERLAPPED structure
);

Parameters

Input buffer

Input buffer length

Output buffer

Output buffer length

Input/output buffer

Input/output buffer length

Status block

Irp->IoStatus.Status is set to STATUS_SUCCESS if the request is successful.

Otherwise, Status to the appropriate error condition as a NTSTATUS code.

For more information, see NTSTATUS Values.

Remarks

Object identifiers are used to track files and directories. They are invisible to most applications and should never be modified by applications. Modifying an object identifier can result in the loss of data from portions of a file, up to and including entire volumes of data.

This operation sets the user data only in the object identifier. Possible uses are to store a time stamp for the creation of the object identifier or a monotonically increasing version number. The ObjectId member of the FILE_OBJECTID_BUFFER structure is ignored. There is no mechanism for modifying the ObjectId member. The typical use of the FSCTL_SET_OBJECT_ID_EXTENDED control code is where the application does not use the user data generated by the NTFS file system when the system creates the object identifier.

To set the object identifier on an object that does not already have one, use the FSCTL_SET_OBJECT_ID control code. To have the NTFS file system generate an object identifier if one does not exist, use the FSCTL_CREATE_OR_GET_OBJECT_ID control code.

Note that the time stamps may not be updated correctly for a remote file. To ensure consistent results, use unbuffered I/O.

In Windows 8 and Windows Server 2012, this code is supported by the following technologies.

Technology Supported
Server Message Block (SMB) 3.0 protocol Yes
SMB 3.0 Transparent Failover (TFO) Yes
SMB 3.0 with Scale-out File Shares (SO) Yes
Cluster Shared Volume File System (CsvFS) Yes
Resilient File System (ReFS) No

See also