# C1.Util.DX.DXGI.Factory1.GetAdapter1

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_DXGI_Factory1_GetAdapter1_" data-uid="C1.Util.DX.DXGI.Factory1.GetAdapter1*">GetAdapter1 Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_DXGI_Factory1_GetAdapter1_" data-uid="C1.Util.DX.DXGI.Factory1.GetAdapter1*"></a>
<h4 id="C1_Util_DX_DXGI_Factory1_GetAdapter1_System_Int32_" data-uid="C1.Util.DX.DXGI.Factory1.GetAdapter1(System.Int32)">GetAdapter1(int)</h4>
<div class="markdown level1 summary"><p>Gets both adapters (video cards) with or without outputs.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Adapter1 GetAdapter1(int index)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetAdapter1(index As Integer) As Adapter1</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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">index</span></td>
      <td><p>The index of the adapter to enumerate.</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.DXGI.Adapter1.html">Adapter1</a></td>
      <td><p>a reference to an <a class="xref" href="C1.Util.DX.DXGI.Adapter1.html">Adapter1</a> interface at the position specified by the Adapter parameter</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_DX_DXGI_Factory1_GetAdapter1_System_Int32__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is not supported by DXGI 1.0, which shipped in Windows?Vista and Windows Server?2008. DXGI 1.1 support is required, which is available on  Windows?7, Windows Server?2008?R2, and as an update to Windows?Vista with Service Pack?2 (SP2) (KB 971644) and Windows Server?2008 (KB 971512).When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy  and recreate the <a class="xref" href="C1.Util.DX.DXGI.Factory1.html">Factory1</a> object. The number of adapters in a system changes when you add or remove a display card, or dock or undock a laptop.When the EnumAdapters1 method succeeds and fills the ppAdapter parameter with the address of the reference to the adapter interface, EnumAdapters1 increments the adapter interface's reference count. When you finish using the  adapter interface, call the Release method to decrement the reference count before you destroy the reference.EnumAdapters1 first returns the local adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. EnumAdapters1 next returns other adapters with outputs. EnumAdapters1 finally returns adapters without outputs.</p>
</div>


<a id="C1_Util_DX_DXGI_Factory1_GetAdapter1_" data-uid="C1.Util.DX.DXGI.Factory1.GetAdapter1*"></a>
<h4 id="C1_Util_DX_DXGI_Factory1_GetAdapter1_System_Int32_C1_Util_DX_DXGI_Adapter1__" data-uid="C1.Util.DX.DXGI.Factory1.GetAdapter1(System.Int32,C1.Util.DX.DXGI.Adapter1@)">GetAdapter1(int, out Adapter1)</h4>
<div class="markdown level1 summary"><p>HRESULT IDXGIFactory1::EnumAdapters1([In] unsigned int Adapter,[Out] IDXGIAdapter1** ppAdapter)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public HResult GetAdapter1(int adapter, out Adapter1 adapterOut)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetAdapter1(adapter As Integer, ByRef adapterOut As Adapter1) As HResult</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="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">adapter</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.DXGI.Adapter1.html">Adapter1</a></td>
      <td><span class="parametername">adapterOut</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.HResult.html">HResult</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
