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

# ResetX (XBOX Series 主機)

> ResetX (XBOX Series 主機) — 將命令清單重設回其初始狀態，如同剛建立新的命令清單一樣。XBOX Direct3D 12 圖形參考。

將命令清單重設回其初始狀態，如同剛建立新的命令清單一樣。

## 語法

```cpp theme={null}
HRESULT ResetX(  
         ID3D12CommandAllocator* pAllocator,  
         ID3D12PipelineState* pInitialState,  
         D3D12XBOX_COMMAND_LIST_RESET_FLAGS Flags  
)  
```

### 參數

*pAllocator*   \_In\_\
類型：[ID3D12CommandAllocator](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nn-d3d12-id3d12commandallocator)\*

指向定義命令配置器之 **ID3D12CommandAllocator** 物件的指標。

*pInitialState*   \_In\_opt\_\
類型：[ID3D12PipelineState](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nn-d3d12-id3d12pipelinestate)\*

指向定義管線初始狀態之 **ID3D12PipelineState** 物件的指標。

*Flags*   \_In\_\
類型：[D3D12XBOX\_COMMAND\_LIST\_RESET\_FLAGS](/zh-TW/reference/graphics/d3d12_xs/enums/d3d12xbox_command_list_reset_flags)

用於重設命令清單的 XBOX 擴充旗標。

### 傳回值

類型：HRESULT

如果成功，會傳回 S\_OK；否則會傳回錯誤碼。如需錯誤碼清單，請參閱 [Direct3D 12 傳回碼](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues)。

## 備註

如需命令清單與命令配置器的詳細資訊，請參閱[建立和記錄命令清單與套件組合](https://learn.microsoft.com/en-us/windows/win32/direct3d12/recording-command-lists-and-bundles#creating-command-lists)。

傳遞 [D3D12XBOX\_COMMAND\_LIST\_RESET\_FLAGS\_MINIMAL\_STATE](/zh-TW/reference/graphics/d3d12_xs/enums/d3d12xbox_command_list_reset_flags) 旗標，可避免在重設期間將預設狀態記錄至清單中。

* 注意：
  執行命令清單時，陣列中的第一個命令清單**不得**以 [D3D12XBOX\_COMMAND\_LIST\_RESET\_FLAGS\_MINIMAL\_STATE](/zh-TW/reference/graphics/d3d12_xs/enums/d3d12xbox_command_list_reset_flags) 旗標重設。

## 需求

**標頭：** d3d12\_xs.h\
**程式庫：** d3d12\_xs.lib\
**支援的平台：** XBOX Series 主機

## 另請參閱

[ID3D12GraphicsCommandList6](/zh-TW/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList6/id3d12graphicscommandlist6)


## Related topics

- [XBOX Series X|S 總覽](/zh-TW/paths/series-xs/overview.md)
- [XBOX 主機遊戲的認證測試 XBOX 需求](/zh-TW/publishing/certification/console-cert-tested-requirements.md)
- [Play Anywhere(主機 + PC)總覽](/zh-TW/paths/play-anywhere/overview.md)
- [XR-130 XBOX Series X|S 世代](/zh-TW/publishing/certification/xr/xr-130.md)
- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
