> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DSTORAGE_REQUEST

> DSTORAGE_REQUEST

# DSTORAGE\_REQUEST

Represents a DirectStorage read request.

## Syntax

```cpp theme={null}
struct DSTORAGE_REQUEST {
    DSTORAGE_REQUEST_OPTIONS Options;

    union
    {
        void *Destination;

        struct
        {
            PULONG_PTR DestinationPageArray;

            UINT16 DestinationPageOffset;
        };
    };

    UINT32 DestinationSize;

    union
    {
        struct
        {
            IDStorageFileX *File;

            UINT64 FileOffset;
        };
        void *Source;

        struct
        {
            PULONG_PTR SourcePageArray;

            UINT16 SourcePageOffset;
        };
    };

    UINT32 SourceSize;

    UINT32 IntermediateSize;

    UINT64 CancellationTag;

    const CHAR *Name;
};
```

### Members

*Options*\
Type: [DSTORAGE\_REQUEST\_OPTIONS](/reference/system/dstorage/structs/dstorage_request_options)

Various options for this request.

*Destination*\
Type: void \*

Address of the buffer to receive the final result of this request.

*DestinationPageArray*\
Type: PULONG\_PTR

Address of the page array to receive the final result of this request if *DestinationIsPhysicalPages* is specified. Each entry is a 64-KB page number.

*DestinationPageOffset*\
Type: UINT16

Offset into the 64-KB page where the destination starts, if *DestinationIsPhysicalPages* is specified.

*DestinationSize*\
Type: UINT32

The expected size, in bytes, of the final result of this request.  If the request does not include decompression this should be equal to *SourceSize*.  For requests that include decompression, this value will be larger than *SourceSize*.

*File*\
Type: IDStorageFileX \*

The file to perform this read request from, if *SourceType* is `DSTORAGE_REQUEST_SOURCE_FILE`.

*FileOffset*\
Type: UINT64

The offset, in bytes, in the file to start the read request at, if *SourceType* is `DSTORAGE_REQUEST_SOURCE_FILE`. If *ZlibDecompress* or *BcpackMode* is specified, the offset must be 16-byte aligned.

\**Source*\
Type: void

Address of the source buffer to be read from, if *SourceType* is `DSTORAGE_REQUEST_SOURCE_MEMORY` and *SourceIsPhysicalPages* is not specified.

*SourcePageArray*\
Type: PULONG\_PTR

Address of the page array to provide the source buffer to be read from if *SourceType* is `DSTORAGE_REQUEST_SOURCE_MEMORY` and *SourceIsPhysicalPages* is specified. Each entry is a 64-KB page number.

*SourcePageOffset*\
Type: UINT16

Offset into the 64-KB page where the source starts, if *SourceType* is `DSTORAGE_REQUEST_SOURCE_MEMORY` and *SourceIsPhysicalPages* is specified.

*SourceSize*\
Type: UINT32

Size, in bytes, to be read from the file or memory source.

*IntermediateSize*\
Type: UINT32

The number of bytes of BCPack compressed data if *ZlibDecompress* and *BcpackMode* are both specified.

*CancellationTag*\
Type: UINT64

An arbitrary UINT64 number used for cancellation matching.

\**Name*\
Type: const CHAR

Optional name of the request. Used for debugging. If specified, the string should be accessible until the request completes.

## Remarks

This structure is used by the
[IDStorageQueueX::EnqueueRequest](/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuerequest) method. The
structure can be reused as soon as `EnqueueRequest` returns.

A single request must satisfy one of the following size requirements:

* The DestinationSize is equal or less than 32MiB (**DSTORAGE\_MAX\_4K\_PAGE\_DESTINATION\_SIZE**).

  **OR**

* The combined memory usage of SourceSize (for memory-to-memory requests only) +
  DestinationSize is equal or less than 1GiB (**DSTORAGE\_MAX\_REQUEST\_SIZE**),
  and the memory buffers that are larger than 32MiB must use either 64KiB pages
  or 2MiB pages.

For more information, see the "EnqueueRequest" section of [DirectStorage Overview](/build/console-features/storage/directstorage/directstorage-overview).

## Requirements

**Header:** dstorage\_xs.h

**Supported platforms:** XBOX Series consoles

## See also

[DStorage](/reference/system/dstorage/dstorage_members)


## Related topics

- [DSTORAGE_REQUEST_OPTIONS](/reference/system/dstorage/structs/dstorage_request_options.md)
- [DStorage](/reference/system/dstorage/dstorage_members.md)
- [IDStorageQueueX::EnqueueRequest](/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuerequest.md)
- [DirectStorage Overview](/build/console-features/storage/directstorage/directstorage-overview.md)
- [DSTORAGE_REQUEST_SOURCE_TYPE](/reference/system/dstorage/enums/dstorage_request_source_type.md)
