Skip to main content
Creates a command queue. Also see ID3D12Device9::CreateCommandQueue1.

Syntax

Parameters

pDesc
Type: const D3D12_COMMAND_QUEUE_DESC *
Specifies a D3D12_COMMAND_QUEUE_DESC that describes the command queue. riid
Type: const IID &
The globally unique identifier (GUID) for the command queue interface. See Remarks. An input parameter. ppCommandQueue
Type: void **
A pointer to a memory block that receives a pointer to the ID3D12CommandQueue interface for the command queue.

Return value

Type: HRESULT This method returns E_OUTOFMEMORY if there is insufficient memory to create the command queue. See Direct3D 12 return codes for other possible return values.

Remarks

The REFIID, or GUID, of the interface to the command queue can be obtained by using the __uuidof() macro. For example, __uuidof(ID3D12CommandQueue) will get the GUID of the interface to a command queue.

Examples

The D3D12HelloTriangle sample uses ID3D12Device::CreateCommandQueue as follows:
Refer to the Example code in the D3D12 reference.

Requirements

Header: d3d12_xs.h or d3d12_x.h
Library: d3d12_xs.lib or d3d12_x.lib
Supported Platforms: XBOX Series consoles and XBOX One family

See Also

Last modified on August 20, 2026