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
  (LPVOID)       lpInBuffer,        // input buffer
  (DWORD)        nInBufferSize,     // size of input buffer
  NULL,                             // lpOutBuffer
  0,                                // nOutBufferSize
  (LPDWORD)      lpBytesReturned,   // number of bytes returned
  (LPOVERLAPPED) lpOverlapped       // OVERLAPPED structure


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


Minimum supported client None supported
Minimum supported server Windows Server 2016 [desktop apps only]
Header winioctl.h (include Windows.h)

See also