c++ - 哪个版本的 Windows SDK 使用 xinput1_3.dll?

标签 c++ dll xna winapi xinput

我目前安装了 Windows SDK 7.0A。此版本的 SDK 包含引用 xinput9_1_0.dllXinput.h:

#define XINPUT_DLL_A  "xinput9_1_0.dll"

我需要我的程序改用 xinput1_3.dll。我想,为了做到这一点,我必须链接到早期版本的 Windows SDK 中的 xinput.lib 文件。

但是,哪个版本的 SDK 包含引用 xinput1_3.dllXinput.h 文件?

最佳答案

我认为解决方案实际上是通过修改项目的包含目录和库目录来使用 Microsoft DirectX SDK(2010 年 6 月)。来自 DirectX SDK 的 XInput.h 文件...

// 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 

...实际上与 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 

因此,默认情况下,DirectX SDK 将实际使用 xinput1_3.dll

关于c++ - 哪个版本的 Windows SDK 使用 xinput1_3.dll?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6975619/

相关文章:

c++ - 矩阵乘法运行时间 Python < C++ < Matlab - 解释

c# - 如何在 Unity3D 中使用 C++ dll?

linux - Monogame (Linux) - 导入 fbx 资源

c++ - 迷宫解算器记录回溯路径

c++ - 在 Windows 中配置 cmake 项目时未找到 Eigen3_DIR

c++ - 为什么 G++ 不警告 Const 成员的未使用结果?

使用抽象接口(interface)的 C++ Dll 边界 -> header 中的智能指针?调用删除?

delphi - 在 Delphi 7 中直接从内存加载 DLL

silverlight - 在 WP7(XNA 或 Silverlight)的 CameraCaptureTask 上绘制 Sprite

c# - XNA-相对于世界移动旋转相机( View )