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

# CreateMetaCommand (XBOX Series 主機)

> 建立指定中繼命令的執行個體。

建立指定中繼命令的執行個體。

## 語法

```cpp theme={null}
HRESULT CreateMetaCommand(
    const GUID & CommandId,
    UINT NodeMask,
    const void  pCreationParametersData,
    SIZE_T CreationParametersDataSizeInBytes,
    const IID & riid,
    void  ppMetaCommand
)
```

### 參數

*CommandId \[in]*\
類型：const GUID &

您想要具現化之中繼命令的全域唯一識別碼 (GUID) 參考。

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

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

*pCreationParametersData \[in, optional]*\
類型：const void \*

選擇性的指標，指向包含建立中繼命令之參數值的常數結構。

*CreationParametersDataSizeInBytes \[in]*\
類型：SIZE\_T

[SIZE\_T](https://learn.microsoft.com/en-us/windows/win32/WinProg/windows-data-types)，包含 <i>pCreationParametersData</i> 所指向之結構的大小 (若有設定)，否則為 0。

*riid*\
類型：const IID &

您想要在 <i>ppMetaCommand</i> 中傳回之介面的全域唯一識別碼 (GUID) 參考。這預期為 [ID3D12MetaCommand](/zh-TW/reference/graphics/d3d12/interfaces/id3d12metacommand/id3d12metacommand_public) 的 GUID。

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

指向記憶體區塊的指標，該區塊會接收指向中繼命令的指標。這是指向 [ID3D12MetaCommand](/zh-TW/reference/graphics/d3d12/interfaces/id3d12metacommand/id3d12metacommand_public) 之指標的位址，代表所建立的中繼命令。

### 傳回值

類型：HRESULT

如果此方法成功，則會傳回 **S\_OK**。否則會傳回 **HRESULT** 錯誤碼。

<table>
  <tr>
    <th>傳回值</th>
    <th>描述</th>
  </tr>

  <tr>
    <td width="40%">
      <dl>
        <dt>DXGI\_ERROR\_UNSUPPORTED</dt>
      </dl>
    </td>

    <td width="60%">
      目前的硬體不支援所要求的演算法
    </td>
  </tr>
</table>

## 需求

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

## 另請參閱

[ID3D12Device5](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device5/id3d12device5_public)


## Related topics

- [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)
- [EnumerateMetaCommandParameters (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_enumeratemetacommandparameters_public.md)
- [CreateCommandList1 (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_createcommandlist1_public.md)
- [CreateCommandQueue1 (XBOX Series 主機)](/zh-TW/reference/graphics/d3d12/interfaces/id3d12device9/methods/id3d12device9_createcommandqueue1_public.md)
