> ## 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

DirectStorage の読み取り要求を表します。

## 構文

```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;
};
```

### メンバー

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

この要求のさまざまなオプション。

*Destination*\
Type: void \*

この要求の最終結果を受け取るバッファーのアドレス。

*DestinationPageArray*\
Type: PULONG\_PTR

*DestinationIsPhysicalPages* が指定されている場合に、この要求の最終結果を受け取るページ配列のアドレス。各エントリは 64 KB のページ番号です。

*DestinationPageOffset*\
Type: UINT16

*DestinationIsPhysicalPages* が指定されている場合、宛先が開始する 64 KB ページ内のオフセット。

*DestinationSize*\
Type: UINT32

この要求の最終結果の期待サイズ (バイト単位)。要求に展開が含まれない場合、これは *SourceSize* に等しくなります。展開を含む要求の場合、この値は *SourceSize* より大きくなります。

*File*\
Type: IDStorageFileX \*

*SourceType* が `DSTORAGE_REQUEST_SOURCE_FILE` の場合、この読み取り要求を実行するファイル。

*FileOffset*\
Type: UINT64

*SourceType* が `DSTORAGE_REQUEST_SOURCE_FILE` の場合、読み取り要求を開始するファイル内のオフセット (バイト単位)。*ZlibDecompress* または *BcpackMode* が指定されている場合、オフセットは 16 バイト境界にアラインされている必要があります。

\**Source*\
Type: void

*SourceType* が `DSTORAGE_REQUEST_SOURCE_MEMORY` で、*SourceIsPhysicalPages* が指定されていない場合、読み取り元のソース バッファーのアドレス。

*SourcePageArray*\
Type: PULONG\_PTR

*SourceType* が `DSTORAGE_REQUEST_SOURCE_MEMORY` で、*SourceIsPhysicalPages* が指定されている場合に、読み取り元のソース バッファーを提供するページ配列のアドレス。各エントリは 64 KB のページ番号です。

*SourcePageOffset*\
Type: UINT16

*SourceType* が `DSTORAGE_REQUEST_SOURCE_MEMORY` で、*SourceIsPhysicalPages* が指定されている場合、ソースが開始する 64 KB ページ内のオフセット。

*SourceSize*\
Type: UINT32

ファイルまたはメモリ ソースから読み取るサイズ (バイト単位)。

*IntermediateSize*\
Type: UINT32

*ZlibDecompress* と *BcpackMode* が両方指定されている場合の BCPack 圧縮データのバイト数。

*CancellationTag*\
Type: UINT64

キャンセル マッチングに使用される任意の UINT64 番号。

\**Name*\
Type: const CHAR

要求の名前 (省略可能)。デバッグに使用されます。指定する場合、文字列は要求が完了するまでアクセス可能である必要があります。

## 解説

この構造体は、
[IDStorageQueueX::EnqueueRequest](/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuerequest) メソッドで使用されます。この
構造体は、`EnqueueRequest` が戻ったらすぐに再利用できます。

1 つの要求は、次のサイズ要件のいずれかを満たす必要があります。

* DestinationSize が 32 MiB (**DSTORAGE\_MAX\_4K\_PAGE\_DESTINATION\_SIZE**) 以下である。

  **または**

* SourceSize (メモリからメモリへの要求の場合のみ) と DestinationSize の合計メモリ使用量が
  1 GiB (**DSTORAGE\_MAX\_REQUEST\_SIZE**) 以下で、
  32 MiB より大きいメモリ バッファーは 64 KiB ページまたは 2 MiB ページを使用する必要がある。

詳細については、[DirectStorage の概要](/build/console-features/storage/directstorage/directstorage-overview) の「EnqueueRequest」セクションを参照してください。

## 要件

**ヘッダー:** dstorage\_xs.h

**サポートされているプラットフォーム:** XBOX Series 本体

## 関連項目

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


## Related topics

- [DSTORAGE_REQUEST_OPTIONS](/ja-jp/reference/system/dstorage/structs/dstorage_request_options.md)
- [IDStorageQueueX::EnqueueRequest](/ja-jp/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_enqueuerequest.md)
- [DStorage](/ja-jp/reference/system/dstorage/dstorage_members.md)
- [DSTORAGE_REQUEST_SOURCE_TYPE](/ja-jp/reference/system/dstorage/enums/dstorage_request_source_type.md)
- [DSTORAGE_SWIZZLE_MODE](/ja-jp/reference/system/dstorage/enums/dstorage_swizzle_mode.md)
