FSCTL_DUPLICATE_EXTENTS_TO_FILE - NtDoc

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

// CTL_CODE(0x0009, 0x0d1, METHOD_BUFFERED, FILE_WRITE_ACCESS)
#define FSCTL_DUPLICATE_EXTENTS_TO_FILE 0x00098344
View the official Win32 API reference

NtDoc

No description available.

Win32 API reference (ni-winioctl-fsctl_duplicate_extents_to_file)

FSCTL_DUPLICATE_EXTENTS_TO_FILE IOCTL

Description

Instructs the file system to copy a range of file bytes on behalf of an application. The destination file may be the same as, or different from, the source file. See Block Cloning for more information.

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

BOOL DeviceIoControl(
  (HANDLE)       hDevice,           // handle to device
  FSCTL_DUPLICATE_EXTENTS_TO_FILE,  // 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

For the implications of overlapped I/O on this operation, see the Remarks section of the DeviceIoControl topic.

See Block Cloning for more information on this operation.

In Windows Server 2016, this function is supported by the following technologies.

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

See also