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

> DSTORAGE_ERROR_RECORD

# DSTORAGE\_ERROR\_RECORD

失敗之 DirectStorage 要求的詳細記錄。

## 語法

```cpp theme={null}
typedef struct DSTORAGE_ERROR_RECORD {  
    UINT32 FailureCount;  
    struct   
    {  
        HRESULT HResult ;  
        DSTORAGE_COMMAND_TYPE CommandType;  
        union  
        {  
            struct   
            {  
                DSTORAGE_REQUEST_OPTIONS Options;  
                void *Destination;  
                UINT32 DestinationSize;  
                WCHAR Filename[MAX_PATH];  
                UINT64 FileOffset;  
                void *Source;  
                UINT32 SourceSize;  
                UINT64 CancellationTag;  
                CHAR Name[DSTORAGE_REQUEST_MAX_NAME];  
            } Request;  
            struct   
            {  
                IDStorageStatusArrayX *StatusArray;  
                UINT32 Index;  
            } Status;  
            struct   
            {  
                ID3D12Fence *Fence;  
                UINT64 Value;  
            } Signal;  
        };  
    } FirstFailure;  
} DSTORAGE_ERROR_RECORD  
```

### 成員

*FailureCount*\
類型：UINT32

自上次呼叫 `RetrieveErrorRecord` 以來，佇列中失敗要求的數目。

*HResult*\
類型：HRESULT

失敗的 HRESULT 碼。

*CommandType*\
類型：[DSTORAGE\_COMMAND\_TYPE](/zh-TW/reference/system/dstorage/enums/dstorage_command_type)

造成失敗之加入佇列要求的類型。

*Options*\
類型：[DSTORAGE\_REQUEST\_OPTIONS](/zh-TW/reference/system/dstorage/structs/dstorage_request_options)

失敗要求的各種選項。

*Destination*\
類型：void \*

用來接收失敗要求最終結果之緩衝區的位址。

*DestinationSize*\
類型：UINT32

失敗要求最終結果的預期大小 (以位元組為單位)，此值是在初始要求中傳入的。

*Filename*\
類型：WCHAR\[MAX\_PATH]

要求所針對的檔案名稱。

*FileOffset*\
類型：UINT64

失敗讀取要求的起始處在檔案中的位移 (以位元組為單位)。

\**Source*\
類型：void

對於以記憶體為來源的要求，這是要讀取之緩衝區的位址。

*SourceSize*\
類型：UINT32

要從來源讀取的位元組數目。

*CancellationTag*\
類型：UINT64

用於比對取消的任意 UINT64 數字。

*Name*\
類型：CHAR\[DSTORAGE\_REQUEST\_MAX\_NAME]

要求的名稱。

\**StatusArray*\
類型：IDStorageStatusArrayX

對於狀態寫入要求，這是 [IDStorageStatusArrayX](/zh-TW/reference/system/dstorage/interfaces/IDStorageStatusArrayX/idstoragestatusarrayx) 物件。

*Index*\
類型：UINT32

對於狀態寫入要求，這是 `IDStorageStatusArrayX` 物件中要接收狀態之狀態項目的索引。

\**Fence*\
類型：ID3D12Fence

對於柵欄寫入要求，這是 `ID3D12Fence` 物件。

*Value*\
類型：UINT64

對於柵欄寫入要求，這是要寫入柵欄的值。

## 備註

此結構由 [IDStorageQueueX::RetrieveErrorRecord](/zh-TW/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_retrieveerrorrecord) 方法使用。

如果 *CommandType* 為 `DSTORAGE_COMMAND_TYPE_NONE`，其餘資料都是未定義的。

如需詳細資訊，請參閱 [DirectStorage 概觀](/zh-TW/build/console-features/storage/directstorage/directstorage-overview)中的「GetErrorEvent/RetrieveErrorRecord」章節。

## 需求

**標頭：** dstorage\_xs.h

**支援的平台：** XBOX Series 主機

## 另請參閱

[DStorage](/zh-TW/reference/system/dstorage/dstorage_members)


## Related topics

- [DSTORAGE_ERROR_RECORD](/reference/system/dstorage/structs/dstorage_error_record.md)
- [IDStorageQueueX::RetrieveErrorRecord](/reference/system/dstorage/interfaces/IDStorageQueueX/methods/idstoragequeuex_retrieveerrorrecord.md)
- [DSTORAGE_COMMAND_TYPE](/reference/system/dstorage/enums/dstorage_command_type.md)
