c++ - 在 Windows 2000 中使用 Visual Studio 2010 编译的 C++ DLL 时出现问题

标签 c++ dll visual-studio-2010

我有一个用非托管 C++ 编写的非常简单的 DLL,我可以从我的应用程序访问它。我最近切换到 Visual Studio 2010,DLL 从 55k 下降到 35k 没有代码更改,现在它不再在 Windows 2000 中加载。我没有更改任何代码或编译器设置。我有我为 0x0500 定义的设置,它应该包括 Windows 2000 支持。有没有其他人遇到过这个问题,或者对我能做什么有任何想法?

最佳答案

Visual Studio 2010 cannot build binaries that run on Windows 2000 .实际上比这更糟糕,they won't run on Windows XP RTM or Windows XP Service Pack 1 either .这是因为 VS2010 的 C 运行时库需要 EncodePointer API,该 API 直到 SP2 才可用。

如果您想支持早期版本的 Windows,您似乎无法安装 VS2008。您可以将整个项目移至 Visual Studio 2008,也可以从 Visual Studio 2010 项目中定位 vc90 (Visual Studio 2008) 工具集。有关后一种方法的更多详细信息,请参阅我的相关问题 here 的此回答。 .

关于c++ - 在 Windows 2000 中使用 Visual Studio 2010 编译的 C++ DLL 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2664607/

相关文章:

c++ - 线程安全测试

c# - PInvoke 和 POINT

c++ - 在 Windows XP 上更新 MSVCRT.dll

c - 为什么我的程序在读取 txt 文件之前就停止了?

visual-studio-2010 - 在 Visual Studio 构建后事件中删除整个文件夹

c++ - 具有完全透明背景的qt小部件

c++ - 为什么调用方法 1 而不是方法 2?

c++ - 可移植应用程序需要非可移植 dll

c - 程序找不到显式链接的 DLL

asp.net - 将 VS2010 迁移到 VS2013 - 我们将面临哪些主要变化?