   D3D11 device creation fails with debug flag!?!
  For some reason whenever I try to use the D3D11_CREATE_DEVICE_DEBUG flag device creation fails. I am on a dell xps m1530 so dx10 hardware. This has happened with both my own code and when I try to run the Hieroglyph3 Basic Application. Here is my code for device creation:void BMGRenderSystem::SetupDXDevice(){    HRESULT hr = S_OK;    UINT createDeviceFlags = 0;#ifdef _DEBUG    createDeviceFlags = D3D11_CREATE_DEVICE_DEBUG;//commented it runs, uncommented it fails.#endif    D3D_FEATURE_LEVEL featureLevels[] ={ D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1, D3D_FEATURE_LEVEL_10_0,    };    UINT numFeatureLevels = _countof(featureLevels);    D3D_FEATURE_LEVEL featureLevelOut;    DXGI_SWAP_CHAIN_DESC desc;    ZeroMemory(&desc, sizeof(desc));    desc.BufferCount = 1;    desc.BufferDesc.Width = mWidth;    desc.BufferDesc.Height = mHeight;    desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;    desc.BufferDesc.RefreshRate.Numerator = 60;    desc.BufferDesc.RefreshRate.Denominator = 1;    desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;    desc.OutputWindow = mWindow.GetHWND();    desc.SampleDesc.Count = 1;    desc.SampleDesc.Quality = 0;    desc.Windowed = TRUE;    desc.Flags = 0;hr = D3D11CreateDeviceAndSwapChain(NULL,D3D_DRIVER_TYPE_HARDWARE,0,D3D11_CREATE_DEVICE_DEBUG,featureLevels,numFeatureLevels,D3D11_SDK_VERSION,&desc,&mSwapChain,&mDevice,&featureLevelOut,&mDeviceContext);ID3D11Texture2D* pBackBuffer;hr = mSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&pBackBuffer);hr = mDevice->CreateRenderTargetView(pBackBuffer, NULL, &mRenderTargetView);pBackBuffer->Release();mDeviceContext->OMSetRenderTargets(1, &mRenderTargetView, 0);D3D11_VIEWPORT vp;vp.Height = mHeight;vp.Width = mWidth;vp.MaxDepth = 1.0f;vp.MinDepth = 0.0f;vp.TopLeftX = 0.0f;vp.TopLeftY = 0.0f;mDeviceContext->RSSetViewports(1, &vp);}Thanks   
  Which SDK release are you using?  February 2010 is the safest bet.   ;  I am currently using the February SDK. One other thing to note though is that I am using VC 2010 express and I think full directx support for that won't be coming until the June SDK.   ;  I'm using VS 2010 at home and all of my DX11 projects are working fine.  Library support from the SDK does not depend on the compiler IDE.Check your HR return value from create device, we'll need to know what it is.  You can use the following code to print a human readable message to the debugger output.  #include <dxerr.h> // link to dxerr.libHRESULT hr = CreateDevice( ... );if( FAILED(hr) ){DXTrace( __FILE__, __LINE__, hr, DXGetErrorDescription(hr), FALSE );} [Edited by - DieterVW on May 14, 2010 12:50:07 PM];  Let me ask you this, are you running Windows 7 and do you have a DX11 video card. If you are using the reference device I think you could create a DX11 device on a lower version card (not 100% positive though). Its obvious that trying to create a DX11 device on DX10 hardware is going to fail. DX11 features require hardware level support...   ;  I am on Vista using DX10 hardware but I am creating the device to be able to fall back to DX10 hardware.EDIT: By the way I tried DXTrace and this is the result.An undetermined error occurred hr=E_FAIL (0x80004005) [Edited by - Wizecoder on May 14, 2010 3:42:30 PM];  I was just checking and although the directx sdk samples work, as soon as I try and select the debug device option the device fails to create. I am extremely confused. I am going to look at different NVIDIA settings and possibly download a new driver.   ;  Possibly the same problem as here ?   ;  Thanks. I actually saw that earlier today and have been regularly checking back to see if he found a solution. I am currently reinstalling the sdk to see if it works.EDIT: Reinstalling worked! Thanks for all of the help.[Edited by - Wizecoder on May 14, 2010 8:30:31 PM]