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

> Creates an instance of the specified meta command.

Creates an instance of the specified meta command.

## Syntax

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

### Parameters

*CommandId \[in]*\
Type: const GUID &

A reference to the globally unique identifier (GUID) of the meta command that you wish to instantiate.

*NodeMask \[in]*\
Type: UINT

For single-adapter operation, set this to zero. If there are multiple adapter nodes, set a bit to identify the node (one of the device's physical adapters) to which the meta command applies. Each bit in the mask corresponds to a single node. Only one bit must be set. See [Multi-adapter systems](https://learn.microsoft.com/en-us/windows/win32/direct3d12/multi-engine).

*pCreationParametersData \[in, optional]*\
Type: const void \*

An optional pointer to a constant structure containing the values of the parameters for creating the meta command.

*CreationParametersDataSizeInBytes \[in]*\
Type: SIZE\_T

A [SIZE\_T](https://learn.microsoft.com/en-us/windows/win32/WinProg/windows-data-types) containing the size of the structure pointed to by <i>pCreationParametersData</i>, if set, otherwise 0.

*riid*\
Type: const IID &

A reference to the globally unique identifier (GUID) of the interface that you wish to be returned in <i>ppMetaCommand</i>. This is expected to be the GUID of [ID3D12MetaCommand](/reference/graphics/d3d12/interfaces/id3d12metacommand/id3d12metacommand_public).

*ppMetaCommand \[out]*\
Type: void \*\*

A pointer to a memory block that receives a pointer to the meta command. This is the address of a pointer to an [ID3D12MetaCommand](/reference/graphics/d3d12/interfaces/id3d12metacommand/id3d12metacommand_public), representing  the meta command created.

### Return value

Type: HRESULT

If this method succeeds, it returns **S\_OK**. Otherwise, it returns an **HRESULT** error code.

<table>
  <tr>
    <th>Return value</th>
    <th>Description</th>
  </tr>

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

    <td width="60%">
      The current hardware does not support the algorithm being requested
    </td>
  </tr>
</table>

## Requirements

**Header:** d3d12\_xs.h\
**Library:** d3d12\_xs.lib\
**Supported Platforms**: XBOX Series consoles

## See Also

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


## Related topics

- [InitializeMetaCommand (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_initializemetacommand_public.md)
- [EnumerateMetaCommands (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_enumeratemetacommands_public.md)
- [EnumerateMetaCommandParameters (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_enumeratemetacommandparameters_public.md)
- [CreateCommandQueue1 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device9/methods/id3d12device9_createcommandqueue1_public.md)
- [CreateCommandList1 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_createcommandlist1_public.md)
