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

> Creates a command list in the closed state.

Creates a command list in the closed state. Also see [ID3D12Device::CreateCommandList](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createcommandlist_public).

## Syntax

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

### Parameters

*nodeMask \[in]*\
Type: UINT

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

*type \[in]*\
Type: D3D12\_COMMAND\_LIST\_TYPE

Specifies the type of command list to create.

*flags*\
Type: D3D12\_COMMAND\_LIST\_FLAGS

Specifies creation flags.

*riid \[in]*\
Type: const IID &

A reference to the globally unique identifier (**GUID**) of the command list interface to return in *ppCommandList*.

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

A pointer to a memory block that receives a pointer to the [ID3D12CommandList](/reference/graphics/d3d12/interfaces/id3d12commandlist/id3d12commandlist_public) or [ID3D12GraphicsCommandList](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList/id3d12graphicscommandlist_xs) interface for the command list.

### Return value

Type: HRESULT

If the function succeeds, it returns **S\_OK**. Otherwise, it returns an [**HRESULT**](https://learn.microsoft.com/en-us/windows/desktop/com/structure-of-com-error-codes) [error code](https://learn.microsoft.com/en-us/windows/win32/com/com-error-codes-10).

| Return value   | Description                                              |
| -------------- | -------------------------------------------------------- |
| E\_OUTOFMEMORY | There is insufficient memory to create the command list. |

See [Direct3D 12 return codes](https://learn.microsoft.com/en-us/windows/win32/direct3d12/d3d12-graphics-reference-returnvalues) for other possible return values.

## Remarks

## Requirements

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

## See Also

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


## Related topics

- [CreateMetaCommand (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_createmetacommand_public.md)
- [CreateCommandQueue1 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device9/methods/id3d12device9_createcommandqueue1_public.md)
- [CreateCommittedResource1 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_createcommittedresource1_public.md)
- [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)
