// ntifs.h
// CTL_CODE(0x0009, 0x0d0, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define FSCTL_SHUFFLE_FILE 0x0009C340
View the official Windows Driver Kit DDI referenceNo description available.
FSCTL_SHUFFLE_FILE adds or removes allocation from within the specified file.
Pointer to a SHUFFLE_FILE_DATA structure that describes the allocation to be shuffled.
Size in bytes of the input buffer.
None; set to NULL.
Set to zero.
FSCTL_SHUFFLE_FILE returns STATUS_SUCCESS upon successful completion; otherwise it returns an NTSTATUS code such as one of the following.
| Return code | Meaning |
|---|---|
| STATUS_ACCESS_DENIED | For various reasons, including only kernel-mode calls are allowed, or the volume is locked. |
| STATUS_BUFFER_TOO_SMALL | The specified input buffer length is smaller than sizeof(SHUFFLE_FILE_DATA). |
| STATUS_MEDIA_WRITE_PROTECTED | Shuffling is not allowed on a read-only volume. |
This control code will cause data to shift within the file. The caller is responsible for protecting/erasing the random data within the added allocation.
To perform this operation, call FltFsControlFile or ZwFsControlFile with the following parameters.
| Parameter | Description |
|---|---|
| Instance | [in] For FltFsControlFile only. An opaque instance pointer for the caller. This parameter is required and cannot be NULL. |
| FileObject | [in] For FltFsControlFile only. A file object pointer for the file or directory that is the target of this request. This parameter is required and cannot be NULL. |
| FileHandle | [in] For ZwFsControlFile only. File handle of the file or directory that is the target of this request. This parameter is required and cannot be NULL. |
| IoStatusBlock | [out] For ZwFsControlFile only. Pointer to an IO_STATUS_BLOCK structure that contains the final status of the request. |
| FsControlCode | [in] Set to FSCTL_SHUFFLE_FILE. |
| InputBuffer | [in] See IOCTL parameters. |
| InputBufferLength | [in] See IOCTL parameters. |