ID2D1DeviceContext::GetDevice method (d2d1_1.h)

Gets the device associated with a device context.

Syntax

void GetDevice(
  [out] ID2D1Device **device
);

Parameters

[out] device

Type: ID2D1Device**

When this method returns, contains the address of a pointer to a Direct2D device associated with this device context.

Return value

None

Remarks

The application can retrieve the device even if it is created from an earlier render target code-path. The application must use an ID2D1DeviceContext interface and then call GetDevice. Some functionality for controlling all of the resources for a set of device contexts is maintained only on an ID2D1Device object.

Requirements

Requirement Value
Minimum supported client Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header d2d1_1.h
DLL D2d1.dll

See also

ID2D1Device

ID2D1DeviceContext