FSCTL_SET_INTEGRITY_INFORMATION - NtDoc

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

// CTL_CODE(0x0009, 0x0a0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define FSCTL_SET_INTEGRITY_INFORMATION 0x0009C280
View the official Win32 API reference

NtDoc

No description available.

Win32 API reference (ni-winioctl-fsctl_set_integrity_information)

FSCTL_SET_INTEGRITY_INFORMATION IOCTL

Description

Retrieves the integrity status of a file or directory on a ReFS volume.

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

BOOL DeviceIoControl(
  (HANDLE) hDevice,                     // handle to file or directory
  FSCTL_SET_INTEGRITY_INFORMATION,      // dwIoControlCode
  (LPDWORD) pInBuffer,                  // FSCTL_SET_INTEGRITY_INFORMATION_BUFFER
  (DWORD) InBufferSize,                 // size of input buffer
  (LPDWORD) NULL,                       // pOutBuffer
  (DWORD) 0,                            // OutBufferSize
  (LPDWORD) NULL,                       // lpBytesReturned
  (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

If the ReplaceFile is used to replace a file with integrity set, and the lpBackupFileName parameter points to a location that does not have integrity set, the integrity status of the original file will not be persisted.

Writes to integrity streams are always cluster-sized. Reads from integrity streams are always done in 16 KB blocks. This can lead to reads failing even when the corrupt area is outside the region being read. For example, if 4 KB is read at offset 0 in a file and there is corruption starting 12 KB into the file, a read would fail with ERROR_DATA_CHECKSUM_ERROR (0x143).

See also