Direct3D 11 Tutorial 14 (Simple Font)
Hi. Been working my way through your excellent Direct3D 11 Tutorials and got as far as the simple font tutorial before hitting a problem. I'm using Visual Studio 2015 on a Windows7 64bit machine, but VS is targeting 32 bit, so I'm pointing the linker at the D3D SDK X86 libraries. I've built all the previous tutorials from scratch and they've all worked fine. I was creating tutorial 14 from scratch as well, but when I hit this problem, I downloaded your files and created a fresh project using your files. Only changes were to the properties for include and lib directories. The code is crashing at line 359: hr = d3d101Device->OpenSharedResource(sharedHandle10, __uuidof(IDXGISurface1), (void**)(&sharedSurface10)); The exception is 'Exception thrown at 0x011685A2 in Font.exe: 0xC0000005: Access violation reading location 0x00000000.' and is caused by d3d101Device being null. I've traced this back to line 324: hr = D3D10CreateDevice1(Adapter, D3D10_DRIVER_TYPE_HARDWARE, NULL,D3D10_CREATE_DEVICE_DEBUG | D3D10_CREATE_DEVICE_BGRA_SUPPORT, D3D10_FEATURE_LEVEL_9_3, D3D10_1_SDK_VERSION, &d3d101Device ); After this call, hr is 'E_NOINTERFACE: No such interface supported' All the HRESULT's prior to this in InitializeDirect3d11App (ie the ones below, before the call to InitD2D_D3D101_DWrite) are returning S_OK, although I can't confirm that the data structures are valid, because VS doesn't have the symbols, IDXGIFactory1 *DXGIFactory; HRESULT hr = CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void**)&DXGIFactory); // Use the first adapter IDXGIAdapter1 *Adapter; hr = DXGIFactory->EnumAdapters1(0, &Adapter); DXGIFactory->Release(); //Create our Direct3D 11 Device and SwapChain////////////////////////////////////////////////////////////////////////// hr = D3D11CreateDeviceAndSwapChain(Adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL, D3D11_CREATE_DEVICE_DEBUG | D3D11_CREATE_DEVICE_BGRA_SUPPORT, NULL, NULL, D3D11_SDK_VERSION, &swapChainDesc, &SwapChain, &d3d11Device, NULL, &d3d11DevCon); I've included dxdiag output below. +[http://www.braynzarsoft.net/image/100212][input image title here] Any pointers you can give me would be greatly appreciated. This site is a great resource, many thanks.