ISurfaceImageSourceNative::BeginDraw method (windows.ui.xaml.media.dxinterop.h)

Opens the supplied DXGI surface for drawing.

Syntax

HRESULT BeginDraw(
  [in]  RECT         updateRect,
  [out] IDXGISurface **surface,
  [out] POINT        *offset
);

Parameters

[in] updateRect

The region of the surface that will be drawn into.

[out] surface

Receives a pointer to the surface for drawing.

[out] offset

Receives the point (x,y) offset of the surface that will be drawn into.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

If the app window that contains the SurfaceImageSource isn't active, like when it's suspended, calling the BeginDraw method returns an error.

Requirements

Requirement Value
Minimum supported client Windows 8.1 [UWP apps only]
Minimum supported server Windows Server 2012 R2 [UWP apps only]
Target Platform Windows
Header windows.ui.xaml.media.dxinterop.h
DLL Windows.UI.Xaml.dll

See also

DirectX and XAML interop

IDXGISurface

ISurfaceImageSourceNative