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

# CreateCommandList1 (XBOX Series 主機)

> 建立處於關閉狀態的命令清單。

建立處於關閉狀態的命令清單。另請參閱 [ID3D12Device::CreateCommandList](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createcommandlist_public)。

## 語法

```cpp theme={null}
HRESULT CreateCommandList1(
    UINT nodeMask,
    D3D12_COMMAND_LIST_TYPE type,
    D3D12_COMMAND_LIST_FLAGS flags,
    const IID & riid,
    void  ppCommandList
)
```

### 參數

*nodeMask \[in]*\
類型：UINT

若為單一 GPU 作業，請將此值設為零。如果有多個 GPU 節點，請設定一個位元來識別要為其建立命令清單的節點 (裝置的實體介面卡)。遮罩中的每個位元都對應至單一節點。只能設定一個位元。另請參閱[多介面卡系統](https://learn.microsoft.com/en-us/windows/win32/direct3d12/multi-engine)。

*type \[in]*\
類型：D3D12\_COMMAND\_LIST\_TYPE

指定要建立的命令清單類型。

*flags*\
類型：D3D12\_COMMAND\_LIST\_FLAGS

指定建立旗標。

*riid \[in]*\
類型：const IID &

要在 *ppCommandList* 中傳回之命令清單介面的全域唯一識別碼 (**GUID**) 參考。

*ppCommandList \[out]*\
類型：void \*\*

記憶體區塊的指標，該區塊會接收命令清單之 [ID3D12CommandList](/zh-TW/reference/graphics/d3d12/interfaces/id3d12commandlist/id3d12commandlist_public) 或 [ID3D12GraphicsCommandList](/zh-TW/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList/id3d12graphicscommandlist_xs) 介面的指標。

### 傳回值

類型：HRESULT

如果函式成功，會傳回 **S\_OK**。否則會傳回 [**HRESULT**](https://learn.microsoft.com/en-us/windows/desktop/com/structure-of-com-error-codes) [錯誤碼](https://learn.microsoft.com/en-us/windows/win32/com/com-error-codes-10)。

| 傳回值 | 描述 |
| - | - |
| E\_OUTOFMEMORY | 記憶體不足，無法建立命令清單。 |

如需其他可能的傳回值，請參閱 [Direct3D 12 傳回碼](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues)。

## 備註

## 需求

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

## 另請參閱

[ID3D12Device::CreateCommandList](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createcommandlist_public)


## Related topics

- [CreateMetaCommand (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_createmetacommand_public.md)
- [CreateCommandQueue1 (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device9/methods/id3d12device9_createcommandqueue1_public.md)
- [CreateCommittedResource1 (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_createcommittedresource1_public.md)
- [InitializeMetaCommand (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_initializemetacommand_public.md)
- [EnumerateMetaCommands (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_enumeratemetacommands_public.md)
