ID2D1DeviceContext::GetDevice method

Gets the device associated with a device context.

Syntax

void GetDevice(
  ID2D1Device **device
);

Parameters

device

Type: ID2D1Device**

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

Return Value

This method does not return a value.

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

   
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