FSCTL_REPAIR_COPIES IOCTL (winioctl.h)

Repair data corruption by selecting the proper copy to use. This control code was introduced in Windows 8 and Windows Server 2012 for use on Storage Spaces and Streams on NTFS and ReFS and non-integrity streams on ReFS (streams with integrity on ReFS handle this automatically.)

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

BOOL DeviceIoControl(
  (HANDLE)  hDevice,                // handle to file or directory
  FSCTL_REPAIR_COPIES,              // dwIoControlCode
  (LPDWORD) pInBuffer,              // REPAIR_COPIES_INPUT
  (DWORD)   InBufferSize,           // size of input buffer
  (LPDWORD) pOutBuffer,             // REPAIR_COPIES_OUTPUT
  (DWORD)   OutBufferSize,          // size of output buffer
  (LPDWORD) lpBytesReturned,        // number of bytes returned
  (LPOVERLAPPED) lpOverlapped       // OVERLAPPED structure
);

Requirements

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

See also