1. What are the prerequisite for running source codes?

The following are some essential prerequisites that should be considered before developing an application using DirectX 11.1:

  • The first important requirement is a personal computer or tablet running on Windows 8.
  • Microsoft Visual Studio Express 2012 for Windows 8 or 8.1 as a developer environment.
  • You should be familiar with DirectX programming and object-oriented programming with C++ and have a basic understanding of the math and the 3D coordinate systems.
  • Set up the Windows Software Development Kit (SDK) for Windows 8.(Optional)

2. Which version of Visual Studio should I use?

Visual Studio 2012 express or later version along with Windows 8 or 8.1

3. Could I run the codes on Windows 7?

No. This book covers new features of DirectX 11.1 on Metro Style application which only runs on Windows 8 or 8.1

4. What is this error “This application can only run in context of an app cointainer”?

You can not run the exe file of Metro Style application. The application runs inside the Visual Studio. For using this application on another computer, you must deploy it with Visual Studio.

5. In order to run the source code, should I link DirectX SDK June 2010 to project?

No. Starting with Windows 8, the DirectX SDK is included as part of the Windows SDK.

6. Can I use DirectX 11.1 Game programming book for creating desktop App not Metro style app?

Yes. You must modify codes in order to create desktop application on Windows 8 and 8.1. At the moment, Windows 7 Service Pack 1 and Windows Server 2008 R2 Service Pack 1 can be updated via the KnowledgeBase 2670838 platform update to improve and use some features of DirectX 11.1. For more information, check the article at http://support. microsoft.com/kb/2670838.

7. Device initialize error!!!!!!!

Please open the game.cpp from your solution and change the featureLevels as following codes, then check the return value of D3D11CreateDevice function (That is hr).

void Game::CreateDevice()
#pragma region Create Device


#if defined(_DEBUG) // For debugging

creationFlags |= D3D11_CREATE_DEVICE_DEBUG;


D3D_FEATURE_LEVEL featureLevels[] =

// Create the Direct3D 11 API device object and a corresponding context.
ComPtr device;
ComPtr context;
hr = D3D11CreateDevice(

I think this time your application works fine, but without features of DirectX 11 or 11.1. Check the value of featureLevel and you will find that this variable has not set to D3D_FEATURE_LEVEL_11_1 or D3D_FEATURE_LEVEL_11_0. Please note this book covers new features of DirectX 11.1 and I assumed that your target machine supports at least features of DirectX 11. In this way you must update both drivers of your graphics card an Update Windows 8 or 8.1 in order to supporting latest drivers.

Leave a Reply

Your email address will not be published. Required fields are marked *


DirectX 11.1 Game Programming