title: D3D11CreateDevice 0x887a002d error
body: <p>First I am learning DirectX 11 from Frank Luna book I came to the part where I need to create the device, but it gives the error: "0x887a002d: The application requested an operation that depends on an SDK component that is missing or mismatched." I kept searching, I tried deferent solutions but nothing did it,</p>
  
  <p>Solutions I tried:
  1)I am using the DirectX library that comes with visual studio 2015, so I installed it.(correctly) 
  2)I tried changing it to D3D11CreateDeviceAndSwapChain but it also gave the same error</p>
  
  <p>I have DirectX SDK(June 2010) hooked up to the project(and yes I want to use DirectX legacy SDK).</p>
  
  <p>My code:</p>
  
  <pre><code>HRESULT hr;
  UINT CreateDeviceFlags = 0;
  D3D_FEATURE_LEVEL featureLevel;
  UINT m4xMsaaQuility;
  
  
      #if defined(DEBUG) || defined(_DEBUG)
        CreateDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
      #endif
  
  hr = D3D11CreateDevice(
      0,
      D3D_DRIVER_TYPE_HARDWARE,
      0,
      CreateDeviceFlags,
      0, 0,
      D3D11_SDK_VERSION,
      &amp;m_pDevice,
      &amp;featureLevel,
      &amp;m_pDeviceContext);
  
  if (FAILED(hr))
  {
      return -1;
  }
  </code></pre>
  
  <p>Includes:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;Windows.h&gt;
  
  #include &lt;d3d11.h&gt;
  #include &lt;d3dcompiler.h&gt;
  #include &lt;DirectXMath.h&gt;
  #include &lt;DirectXColors.h&gt;
  
  // Link Library Dependencies
  #pragma  comment(lib, "d3d11.lib")
  #pragma  comment(lib, "dxgi.lib")
  #pragma  comment(lib, "d3dcompiler.lib")
  #pragma  comment(lib, "winmm.lib")
  </code></pre>