# C1.Util.DX.DXGI.Device.CreateSurface

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DXGI_Device_CreateSurface_" data-uid="C1.Util.DX.DXGI.Device.CreateSurface*">CreateSurface Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DXGI_Device_CreateSurface_" data-uid="C1.Util.DX.DXGI.Device.CreateSurface*"></a>
<h4 id="C1_Util_DX_DXGI_Device_CreateSurface_C1_Util_DX_DXGI_SurfaceDescription__System_Int32_System_Int32_System_Nullable_C1_Util_DX_DXGI_SharedResource__" data-uid="C1.Util.DX.DXGI.Device.CreateSurface(C1.Util.DX.DXGI.SurfaceDescription@,System.Int32,System.Int32,System.Nullable{C1.Util.DX.DXGI.SharedResource})">CreateSurface(ref SurfaceDescription, int, int, SharedResource?)</h4>
<div class="markdown level1 summary"><p>HRESULT IDXGIDevice::CreateSurface([In] const DXGI_SURFACE_DESC* pDesc,[In] unsigned int NumSurfaces,[In] unsigned int Usage,[In, Optional] const DXGI_SHARED_RESOURCE* pSharedResource,[Out] IDXGISurface** ppSurface)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Surface CreateSurface(ref SurfaceDescription descRef, int numSurfaces, int usage, SharedResource? sharedResourceRef)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateSurface(ByRef descRef As SurfaceDescription, numSurfaces As Integer, usage As Integer, sharedResourceRef As SharedResource?) As Surface</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.SurfaceDescription.html">SurfaceDescription</a></td>
      <td><span class="parametername">descRef</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">numSurfaces</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">usage</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.SharedResource.html">SharedResource</a>?</td>
      <td><span class="parametername">sharedResourceRef</span></td>
      <td></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.DXGI.Surface.html">Surface</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
