1

I currently have Windows SDK 7.0A installed. This version of the SDK contains Xinput.h which references xinput9_1_0.dll:

#define XINPUT_DLL_A  "xinput9_1_0.dll"

I need my program to use xinput1_3.dll instead. I figured that in order to do this, I must link with the xinput.lib file from an earlier version of Windows SDK.

But, which version of the SDK contains the Xinput.h file that references xinput1_3.dll?

Nick Bolton
  • 38,276
  • 70
  • 174
  • 242

2 Answers2

2

I think the solution is actually to use the Microsoft DirectX SDK (June 2010) by modifying the include and library dirs for your project. The XInput.h file from the DirectX SDK...

// XInput.h from the DirectX SDK

#ifndef XINPUT_USE_9_1_0
#define XINPUT_DLL_A  "xinput1_3.dll"
#define XINPUT_DLL_W L"xinput1_3.dll"
#else
#define XINPUT_DLL_A  "xinput9_1_0.dll"
#define XINPUT_DLL_W L"xinput9_1_0.dll"
#endif
#ifdef UNICODE
    #define XINPUT_DLL XINPUT_DLL_W
#else
    #define XINPUT_DLL XINPUT_DLL_A
#endif 

... is actually a little different to the one from the Windows SDK...

// XInput.h from the Windows SDK

#define XINPUT_DLL_A  "xinput9_1_0.dll"
#define XINPUT_DLL_W L"xinput9_1_0.dll"
#ifdef UNICODE
    #define XINPUT_DLL XINPUT_DLL_W
#else
    #define XINPUT_DLL XINPUT_DLL_A
#endif 

So, by default, the DirectX SDK will actually use xinput1_3.dll.

Nick Bolton
  • 38,276
  • 70
  • 174
  • 242
  • Hmm, that's strange... I wonder why this was down voted. Seemed like the best solution to me. Can any one shed some light on this? – Nick Bolton Aug 08 '11 at 00:15
  • Seems like a good answer. Loosely related: what are the differences between 1.3 and older versions of XInput? I have found a MSDN document, but it is very brief and does not really say much: http://msdn.microsoft.com/en-us/library/windows/desktop/hh405051(v=vs.85).aspx – Suma Feb 22 '12 at 09:30
0

The modified date on XInput9_1_0.dll reads 2009-07-14, so I will try to use the latest version before this release, which is: v6.1 (Windows Server 2008 & .NET 3.5 SDK) from 2008-02-05

Nick Bolton
  • 38,276
  • 70
  • 174
  • 242