PFND3D10DDI_CREATEDEVICE callback function (d3d10umddi.h)

The CreateDevice(D3D10) function creates a graphics context that is referenced in subsequent calls.

Syntax

PFND3D10DDI_CREATEDEVICE Pfnd3d10ddiCreatedevice;

HRESULT Pfnd3d10ddiCreatedevice(
  D3D10DDI_HADAPTER unnamedParam1,
  D3D10DDIARG_CREATEDEVICE *unnamedParam2
)
{...}

Parameters

unnamedParam1

hAdapter [in]

A handle to the graphics adapter object that was created with the OpenAdapter10 function.

unnamedParam2

pCreateData [in, out]

A pointer to a D3D10DDIARG_CREATEDEVICE structure. On input, this structure contains information that the driver can use. On output, the driver specifies information in the structure that the Microsoft Direct3D runtime can use.

Return value

CreateDevice(D3D10) returns one of the following values:

Return code Description
S_OK The graphics context was successfully created.
DXGI_STATUS_NO_REDIRECTION The graphics context was successfully created. However, the DirectX Graphics Infrastructure (DXGI) should not use the shared resource presentation path to effect communication with the Desktop Windows Manager (DWM). For more information about the DXGI DDI, see Supporting the DXGI DDI.
E_OUTOFMEMORY CreateDevice(D3D10) could not allocate the memory that was required for it to complete.

Remarks

A display device is a graphics context that is used to hold a collection of rendering state. The same process can create multiple devices on a given adapter. Note that the number of display devices that can simultaneously exist is limited only by available system memory. That is, a driver cannot hardcode a maximum device limit.

Generally, devices are independent of each other, so that resources that are created in one device cannot be referenced or accessed by resources that are created in another. However, cross-process resources are an exception to this rule.

Requirements

Requirement Value
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Target Platform Desktop
Header d3d10umddi.h (include D3d10umddi.h)

See also

D3D10DDIARG_CREATEDEVICE

D3D10DDI_ADAPTERFUNCS

DestroyDevice(D3D10)

OpenAdapter10