FSCTL_OFFLOAD_READ_OUTPUT structure

The FSCTL_OFFLOAD_READ_OUTPUT structure contains the output for the FSCTL_OFFLOAD_READ control code request.

Syntax

typedef struct _FSCTL_OFFLOAD_READ_OUTPUT {
  ULONG     Size;
  ULONG     Flags;
  ULONGLONG TransferLength;
  UCHAR     Token[512];
} FSCTL_OFFLOAD_READ_OUTPUT, *PFSCTL_OFFLOAD_READ_OUTPUT;

Members

Size

The size of this structure. Set this member to sizeof(FSCTL_OFFLOAD_READ_OUTPUT).

Flags

Result flags. This value is a bitwise OR combination of these values:

Value Meaning
OFFLOAD_READ_FLAG_FILE_TOO_SMALL
0x00000001
The file to read from is too small for an offload operation.
OFFLOAD_READ_FLAG_ALL_ZERO_BEYOND_CURRENT_RANGE
0x00000002
The range extending beyond the selected range contains all zeros.
OFFLOAD_READ_FLAG_CANNOT_OFFLOAD_BEYOND_CURRENT_RANGE
0x00000004
The offload operation cannot complete beyond the selected range. An non-offloaded read method should be used to complete the operation.

TransferLength

The length, in bytes, of data represented by Token.

Token

A byte array that contains a token structure, STORAGE_OFFLOAD_TOKEN, representing a file data within a range specified in FSCTL_OFFLOAD_READ_INPUT. The contents of Token must remain unmodified between offload operations.

Remarks

If the FSCTL_OFFLOAD_READ operation is successful, the storage device's copy provider returns, in FSCTL_OFFLOAD_READ_OUTPUT, a unique token value identifying the portion of file data read.

The copy provider retains the data read for the duration in the TokenTimeToLive member of the FSCTL_OFFLOAD_READ_INPUT structure.

Token represents a contiguous region of the file beginning with the requested offset in the FileOffset member of FSCTL_OFFLOAD_READ_INPUT. The resulting length copied, TransferLength, may be smaller than what was originally specified in CopyLength member of FSCTL_OFFLOAD_READ_INPUT. A smaller value indicates that Token was able to logically represent less data than was requested.

If less data than requested was transferred, the read operation may be completed by performing another FSCTL_OFFLOAD_READ request. The next request uses updated FileOffset member in the FSCTL_OFFLOAD_READ_INPUT structure with the value in TransferLength and an adjusted read length of the previous length minus the value in TransferLength. Also, an incomplete read operation can be completed through a non-offloaded read method, using the ZwReadFile routine, for example.

Requirements

   
Minimum supported client Available starting with Windows 8.
Header ntifs.h (include Ntifs.h, Fltkernel.h)

See also

FSCTL_OFFLOAD_READ

FSCTL_OFFLOAD_READ_INPUT

STORAGE_OFFLOAD_TOKEN