D3D12CreateDevice

Creates a device that represents the display adapter.

Syntax

public:
HRESULT D3DAPI D3D12CreateDevice(
         IGraphicsUnknown *pAdapter,
         D3D_FEATURE_LEVEL MinimumFeatureLevel,
         REFIID riid,
         void **ppDevice
)  

Parameters

pAdapter
Type: IGraphicsUnknown *

[in, optional] A pointer to the video adapter to use when creating a device. Pass NULL to use the default adapter.

MinimumFeatureLevel
Type: D3D_FEATURE_LEVEL 

The minimum feature level required for successful device creation.

riid
Type: REFIID 

[in] The globally unique identifier (GUID) for the device interface. This parameter and ppDevice can be addressed with the single macro IID_PPV_ARGS.

**ppDevice
Type: void 

[out, optional] A pointer to a memory block that receives a pointer to the device.

Return value

Type: HRESULT D3DAPI 

One of the Direct3D 12 return codes.

Requirements

Header: Declared in d3d12_x.h.

Library: Use d3d12_x.lib.