// winioctl.h
// CTL_CODE(0x0009, 0x0ad, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define FSCTL_REPAIR_COPIES 0x0009C2B4
View the official Win32 API referenceNo description available.
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
);
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.