Games for Windows and the DirectX SDK blog

Technical tips, tricks, and news about game development for Microsoft platforms including desktop, Xbox, and UWP


Project maintained by walbourn Hosted on GitHub Pages — Theme by mattgraham
Home | Posts by Tag | Posts by Month

Known Issue - D3D11InstallHelper sample

directx

Originally posted to Chuck Walbourn's Blog on MSDN,

I recently found a minor problem with the existing D3D11InstallHelper sample that shipped in August 2009, February 2010, and June 2010 versions of the DirectX SDK. The supplied version of D3D11Install.exe is correct, but if you compile it using the Visual Studio project yourself, it does not properly inject a reference to the Windows Common Controls version 6.0 into the manifest file. The result of this is that the dialogs (which all contain hyperlinks using the SysLink common control) do not initialize and fail to display.

The fix is fairly easy. In the D3D11Install.cpp file, just add a #pragma statement:

//-----------------------------------------------------------------------------
// File: D3D11Install.cpp
//
// Desc: Windows code that calls D3D11InstallHelper sample DLL and displays
//       the recommended UI prompts and messages.
//
// (C) Copyright Microsoft Corp.  All rights reserved.
//-----------------------------------------------------------------------------
#define _WIN32_DCOM
#define _CRT_SECURE_NO_DEPRECATE

#include "D3D11InstallHelper.h"
#include "resource.h"

#include <stdio.h>
#include <shlobj.h>
#include <process.h>
#include <shellapi.h>

#define MSG_SIZE    1024
#pragma comment(linker,"\"/manifestdependency:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")

Update: Note the most current version of this sample is available on GitHub.