D3D11XCreateDeviceXAndSwapChain1

Creates a device and swap chain.

Syntax

HRESULT D3D11XCreateDeviceXAndSwapChain1(
         const D3D11X_CREATE_DEVICE_PARAMETERS *pParameters,
         const DXGI_SWAP_CHAIN_DESC1 *pSwapChainDesc,
         IDXGISwapChain1 **ppSwapChain,
         ID3D11DeviceX **ppDevice,
         ID3D11DeviceContextX **ppImmediateContext
)  

Parameters

pParameters
Type: D3D11X_CREATE_DEVICE_PARAMETERS *

[in] The parameters for creating a device, as a pointer to a D3D11X_CREATE_DEVICE_PARAMETERS structure.

pSwapChainDesc
Type: DXGI_SWAP_CHAIN_DESC1 *

[in, optional] The swap chain description, as a pointer to a DXGI_SWAP_CHAIN_DESC1.

ppSwapChain
Type: IDXGISwapChain1 **

[out, optional] The swap chain, as a pointer to a pointer to IDXGISwapChain1.

ppDevice
Type: ID3D11DeviceX **

[out, optional] The device, as a pointer to a pointer to an ID3D11DeviceX.

ppImmediateContext
Type: ID3D11DeviceContextX **

[out, optional] The immediate context, as a pointer to a pointer to an ID3D11DeviceContextX.

Return value

Type: HRESULT 

This method returns one of the Direct3D 11 return codes.

Requirements

Header: Declared in d3d11_x.h.

Library: Use d3d11_x.lib.