# C1.Util.DX.Direct3D9.Direct3D.CreateDevice

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct3D9_Direct3D_CreateDevice_" data-uid="C1.Util.DX.Direct3D9.Direct3D.CreateDevice*">CreateDevice Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct3D9_Direct3D_CreateDevice_" data-uid="C1.Util.DX.Direct3D9.Direct3D.CreateDevice*"></a>
<h4 id="C1_Util_DX_Direct3D9_Direct3D_CreateDevice_System_Int32_C1_Util_DX_Direct3D9_DeviceType_System_IntPtr_C1_Util_DX_Direct3D9_CreateFlags_C1_Util_DX_Direct3D9_PresentParameters___" data-uid="C1.Util.DX.Direct3D9.Direct3D.CreateDevice(System.Int32,C1.Util.DX.Direct3D9.DeviceType,System.IntPtr,C1.Util.DX.Direct3D9.CreateFlags,C1.Util.DX.Direct3D9.PresentParameters[])">CreateDevice(int, DeviceType, IntPtr, CreateFlags, PresentParameters[])</h4>
<div class="markdown level1 summary"><p>HRESULT IDirect3D9::CreateDevice([In] unsigned int Adapter,[In] D3DDEVTYPE DeviceType,[In] HWND hFocusWindow,[In] D3DCREATE BehaviorFlags,[In, Buffer] D3DPRESENT_PARAMETERS* pPresentationParameters,[Out, Fast] IDirect3DDevice9** ppReturnedDeviceInterface)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Device CreateDevice(int adapter, DeviceType deviceType, IntPtr hFocusWindow, CreateFlags behaviorFlags, PresentParameters[] presentationParametersRef)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateDevice(adapter As Integer, deviceType As DeviceType, hFocusWindow As IntPtr, behaviorFlags As CreateFlags, presentationParametersRef As PresentParameters()) As Device</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.Direct3D9.DeviceType.html">DeviceType</a></td>
      <td><span class="parametername">deviceType</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a></td>
      <td><span class="parametername">hFocusWindow</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D9.CreateFlags.html">CreateFlags</a></td>
      <td><span class="parametername">behaviorFlags</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct3D9.PresentParameters.html">PresentParameters</a>[]</td>
      <td><span class="parametername">presentationParametersRef</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.Direct3D9.Device.html">Device</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
