Gets either the surface that was specified when the bitmap was created, or the default surface created when the bitmap was created.
- dxgiSurface [out, optional]
The underlying DXGI surface for the bitmap.
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
|S_OK||No error occurred.|
|D2DERR_BITMAP_BOUND_AS_TARGET||Cannot draw with a bitmap that is currently bound as the target bitmap.|
The bitmap used must have been created from a DXGI surface render target, a derived render target, or a device context created from an ID2D1Device.
The returned surface can be used with Microsoft Direct3D or any other API that interoperates with shared surfaces. The application must transitively ensure that the surface is usable on the Direct3D device that is used in this context. For example, if using the surface with Direct2D then the Direct2D render target must have been created through ID2D1Factory::CreateDxgiSurfaceRenderTarget or on a device context created on the same device.
Minimum supported client
|Windows 8 and Platform Update for Windows 7 [desktop apps | Windows Store apps]|
Minimum supported server
|Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | Windows Store apps]|
Build date: 11/26/2013