# C1.Util.DX.DXGI.Factory

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Util_DX_DXGI_Factory" data-uid="C1.Util.DX.DXGI.Factory" class="text-break">Factory Class
</h1>
  <div class="markdown level0 summary"><p>IDXGIFactory</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="C1.Util.DX.DisposeBase.html">DisposeBase</a></div>
    <div class="level2"><a class="xref" href="C1.Util.DX.CppObject.html">CppObject</a></div>
    <div class="level3"><a class="xref" href="C1.Util.DX.ComObject.html">ComObject</a></div>
    <div class="level4"><a class="xref" href="C1.Util.DX.DXGI.DXGIObject.html">DXGIObject</a></div>
    <div class="level5"><span class="xref">Factory</span></div>
      <div class="level6"><a class="xref" href="C1.Util.DX.DXGI.Factory1.html">Factory1</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><a class="xref" href="C1.Util.DX.IUnknown.html">IUnknown</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Util.DX.DXGI.html">C1.Util.DX.DXGI</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.DX.10.dll</h6>
  <h5 id="C1_Util_DX_DXGI_Factory_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[Guid(&quot;7b7166ec-21c7-44ae-b21a-c9ae321ae369&quot;)]
public class Factory : DXGIObject, IDisposable, IUnknown</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;Guid(&quot;7b7166ec-21c7-44ae-b21a-c9ae321ae369&quot;)&gt;
Public Class Factory
    Inherits DXGIObject
    Implements IDisposable, IUnknown</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_DXGI_Factory__ctor_System_IntPtr_" data-uid="C1.Util.DX.DXGI.Factory.#ctor(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.DXGI.Factory.-ctor.html#C1_Util_DX_DXGI_Factory__ctor_System_IntPtr_">Factory(nint)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.DXGI.Factory.html">Factory</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_DXGI_Factory_Adapters" data-uid="C1.Util.DX.DXGI.Factory.Adapters">
          <a class="xref" href="C1.Util.DX.DXGI.Factory.Adapters.html#C1_Util_DX_DXGI_Factory_Adapters">Adapters</a>
        </td>
        <td class="markdown level1 summary"><p>Return an array of <a class="xref" href="C1.Util.DX.DXGI.Adapter.html">Adapter</a> available from this factory.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_DXGI_Factory_CreateSoftwareAdapter_System_IntPtr_" data-uid="C1.Util.DX.DXGI.Factory.CreateSoftwareAdapter(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.DXGI.Factory.CreateSoftwareAdapter.html#C1_Util_DX_DXGI_Factory_CreateSoftwareAdapter_System_IntPtr_">CreateSoftwareAdapter(nint)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT IDXGIFactory::CreateSoftwareAdapter([In] HINSTANCE Module,[Out] IDXGIAdapter** ppAdapter)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DXGI_Factory_CreateSwapChain_C1_Util_DX_ComObject_C1_Util_DX_DXGI_SwapChainDescription__" data-uid="C1.Util.DX.DXGI.Factory.CreateSwapChain(C1.Util.DX.ComObject,C1.Util.DX.DXGI.SwapChainDescription@)">
          <a class="xref" href="C1.Util.DX.DXGI.Factory.CreateSwapChain.html#C1_Util_DX_DXGI_Factory_CreateSwapChain_C1_Util_DX_ComObject_C1_Util_DX_DXGI_SwapChainDescription__">CreateSwapChain(ComObject, ref SwapChainDescription)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT IDXGIFactory::CreateSwapChain([In] IUnknown* pDevice,[In] DXGI_SWAP_CHAIN_DESC* pDesc,[Out, Fast] IDXGISwapChain** ppSwapChain)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DXGI_Factory_GetAdapter_System_Int32_" data-uid="C1.Util.DX.DXGI.Factory.GetAdapter(System.Int32)">
          <a class="xref" href="C1.Util.DX.DXGI.Factory.GetAdapter.html#C1_Util_DX_DXGI_Factory_GetAdapter_System_Int32_">GetAdapter(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets both adapters (video cards) with or without outputs.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DXGI_Factory_GetAdapter_System_Int32_C1_Util_DX_DXGI_Adapter__" data-uid="C1.Util.DX.DXGI.Factory.GetAdapter(System.Int32,C1.Util.DX.DXGI.Adapter@)">
          <a class="xref" href="C1.Util.DX.DXGI.Factory.GetAdapter.html#C1_Util_DX_DXGI_Factory_GetAdapter_System_Int32_C1_Util_DX_DXGI_Adapter__">GetAdapter(int, out Adapter)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT IDXGIFactory::EnumAdapters([In] unsigned int Adapter,[Out] IDXGIAdapter** ppAdapter)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DXGI_Factory_GetAdapterCount" data-uid="C1.Util.DX.DXGI.Factory.GetAdapterCount">
          <a class="xref" href="C1.Util.DX.DXGI.Factory.GetAdapterCount.html#C1_Util_DX_DXGI_Factory_GetAdapterCount">GetAdapterCount()</a>
        </td>
        <td class="markdown level1 summary"><p>Return the number of available adapters from this factory.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DXGI_Factory_GetWindowAssociation" data-uid="C1.Util.DX.DXGI.Factory.GetWindowAssociation">
          <a class="xref" href="C1.Util.DX.DXGI.Factory.GetWindowAssociation.html#C1_Util_DX_DXGI_Factory_GetWindowAssociation">GetWindowAssociation()</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT IDXGIFactory::GetWindowAssociation([Out] HWND* pWindowHandle)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DXGI_Factory_MakeWindowAssociation_System_IntPtr_C1_Util_DX_DXGI_WindowAssociationFlags_" data-uid="C1.Util.DX.DXGI.Factory.MakeWindowAssociation(System.IntPtr,C1.Util.DX.DXGI.WindowAssociationFlags)">
          <a class="xref" href="C1.Util.DX.DXGI.Factory.MakeWindowAssociation.html#C1_Util_DX_DXGI_Factory_MakeWindowAssociation_System_IntPtr_C1_Util_DX_DXGI_WindowAssociationFlags_">MakeWindowAssociation(nint, WindowAssociationFlags)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT IDXGIFactory::MakeWindowAssociation([In] HWND WindowHandle,[In] DXGI_MWA_FLAGS Flags)</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="operators">Operators
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_DXGI_Factory_op_Explicit_System_IntPtr__C1_Util_DX_DXGI_Factory" data-uid="C1.Util.DX.DXGI.Factory.op_Explicit(System.IntPtr)~C1.Util.DX.DXGI.Factory">
          <a class="xref" href="C1.Util.DX.DXGI.Factory.op_Explicit.html#C1_Util_DX_DXGI_Factory_op_Explicit_System_IntPtr__C1_Util_DX_DXGI_Factory">explicit operator Factory(nint)</a>
        </td>
        <td class="markdown level1 summary"><p>Performs an explicit conversion from <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">nint</a> to <a class="xref" href="C1.Util.DX.DXGI.Factory.html">Factory</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
