Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ISurfaceImageSourceNativeWithD2D::SetDevice method

Sets the Microsoft DirectX Graphics Infrastructure (DXGI) or Direct2D device, created with D3D11_CREATE_DEVICE_BGRA_SUPPORT, that will draw the surface.

Syntax


HRESULT SetDevice(
  [in] IDXGIDevice *pDevice
);

Parameters

pDevice [in]

Pointer to the DXGI device interface. You can pass an ID2D1Device to signal that this surface participates in Direct2D batching to improve performance when updating Direct2D content across multiple surfaces. The device must have multithreading supported enabled if the app draws to the surface from a background thread.

Return value

This method fails when the SurfaceImageSource is larger than the maximum texture size supported by the Direct3D device. Apps should use VirtualSurfaceImageSource for surfaces larger than the maximum texture size supported by the Direct3D device.

Requirements

Minimum supported client

Windows 8.1 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 R2 [desktop apps | Windows Store apps]

Header

Windows.ui.xaml.media.dxinterop.h

IDL

Windows.ui.xaml.media.dxinterop.idl

DLL

Windows.UI.Xaml.dll

See also

ISurfaceImageSourceNativeWithD2D
SurfaceImageSource
VirtualSurfaceImageSource
DirectX and XAML interop

 

 

Community Additions

Show:
© 2015 Microsoft