# C1.Util.DX.DXGI.Surface.Map

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DXGI_Surface_Map_" data-uid="C1.Util.DX.DXGI.Surface.Map*">Map Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DXGI_Surface_Map_" data-uid="C1.Util.DX.DXGI.Surface.Map*"></a>
<h4 id="C1_Util_DX_DXGI_Surface_Map_C1_Util_DX_DXGI_MapFlags_" data-uid="C1.Util.DX.DXGI.Surface.Map(C1.Util.DX.DXGI.MapFlags)">Map(MapFlags)</h4>
<div class="markdown level1 summary"><p>Acquires access to the surface data.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DataRectangle Map(MapFlags flags)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Map(flags As MapFlags) As DataRectangle</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.MapFlags.html">MapFlags</a></td>
      <td><span class="parametername">flags</span></td>
      <td><p>Flags specifying CPU access permissions.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataRectangle.html">DataRectangle</a></td>
      <td><p>A <span class="xref">C1.Win.DX.DataRectangle</span> for accessing the mapped data, or <code>null</code> on failure.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_DXGI_Surface_Map_" data-uid="C1.Util.DX.DXGI.Surface.Map*"></a>
<h4 id="C1_Util_DX_DXGI_Surface_Map_C1_Util_DX_DXGI_MapFlags_C1_Util_DX_DataStream__" data-uid="C1.Util.DX.DXGI.Surface.Map(C1.Util.DX.DXGI.MapFlags,C1.Util.DX.DataStream@)">Map(MapFlags, out DataStream)</h4>
<div class="markdown level1 summary"><p>Acquires access to the surface data.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public DataRectangle Map(MapFlags flags, out DataStream dataStream)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Map(flags As MapFlags, ByRef dataStream As DataStream) As DataRectangle</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.MapFlags.html">MapFlags</a></td>
      <td><span class="parametername">flags</span></td>
      <td><p>Flags specifying CPU access permissions.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataStream.html">DataStream</a></td>
      <td><span class="parametername">dataStream</span></td>
      <td><p>A data stream.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DataRectangle.html">DataRectangle</a></td>
      <td><p>A <span class="xref">C1.Win.DX.DataRectangle</span> for accessing the mapped data, or <code>null</code> on failure.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_DXGI_Surface_Map_" data-uid="C1.Util.DX.DXGI.Surface.Map*"></a>
<h4 id="C1_Util_DX_DXGI_Surface_Map_C1_Util_DX_DXGI_MappedRectangle__System_Int32_" data-uid="C1.Util.DX.DXGI.Surface.Map(C1.Util.DX.DXGI.MappedRectangle@,System.Int32)">Map(out MappedRectangle, int)</h4>
<div class="markdown level1 summary"><p>HRESULT IDXGISurface::Map([Out] DXGI_MAPPED_RECT* pLockedRect,[In] unsigned int MapFlags)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void Map(out MappedRectangle lockedRectRef, int mapFlags)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub Map(ByRef lockedRectRef As MappedRectangle, mapFlags As Integer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.MappedRectangle.html">MappedRectangle</a></td>
      <td><span class="parametername">lockedRectRef</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">mapFlags</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
