IDXGISurface::Map Method

Get a pointer to the data contained in the surface, and deny GPU access to the surface.

Syntax

public:
HRESULT Map(
         DXGI_MAPPED_RECT *pLockedRect,
         UINT MapFlags
)  

Parameters

pLockedRect
Type: DXGI_MAPPED_RECT *

[out] A pointer to the surface data (see DXGI_MAPPED_RECT).

MapFlags
Type: UINT 

CPU read-write flags. These flags can be combined with a logical OR.

Return value

Type: HRESULT 

Returns S_OK if successful; otherwise, returns one of the error codes that are described in the DXGI_ERROR topic.

Remarks

Use IDXGISurface::Map to access a surface from the CPU. To release a mapped surface (and allow GPU access) call IDXGISurface::Unmap.

Requirements

Header: Declared in d3d11_x.h (dxgi.h on other Windows platforms).

Library: Use d3d11_x.lib (dxgi.lib on other Windows platforms).

See also

IDXGISurface

IDXGISurface Members