【发布时间】:2012-01-13 10:03:27
【问题描述】:
我创建的 32 位 ATL dll 有问题 --- 每当我在 Windows XP(32 位)计算机上使用该 dll 时,它都会崩溃而没有任何警告。我认为这个问题与我编译 dll 的 Windows 版本有关,但我不确定。只是一点历史:
我最初使用 Visual Studio 2008 在 Windows XP(32 位)机器上开发 dll。此版本的 dll 在 Windows XP(32 位)和 Windows 7(32 位和 64 位)上运行良好.然后,我得到了一个带有 Windows 7(64 位)和 Visual Studio 2010 的新开发盒。我将我的 VS2008 项目转换为 VS2010,编译它,它可以在 Windows 7(32 位和 64 位)机器上完美运行;但是,当我在 Windows XP(32 位)上运行它时,它会崩溃。
有趣的是,我在XP机器上成功regsv32 dll,但是当我运行dependency walker时,它说它丢失了一堆文件:
api-ms-win-core-console-l1-1-0.dll
api-ms-win-core-datetime-l1-1-0.dll
api-ms-win-core-debug-l1-1-0.dll
api-ms-win-core-delayload-l1-1-0.dll
api-ms-win-core-errorhandling-l1-1-0.dll
api-ms-win-core-fibers-l1-1-0.dll
api-ms-win-core-file-l1-1-0.dll
api-ms-win-core-handle-l1-1-0.dll
api-ms-win-core-heap-l1-1-0.dll
api-ms-win-core-interlocked-l1-1-0.dll
api-ms-win-core-io-l1-1-0.dll
api-ms-win-core-libraryloader-l1-1-0.dll
...any many more of the same
我将所有这些文件从我的开发机器复制到 Windows XP 机器上,现在依赖分析器告诉我:
Error: The Side-by-Side configuration information for "c:\documents and settings\poibri01\desktop\distributable\WERUI.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Error: Modules with different CPU types were found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
我不知道从这里去哪里。谁能帮帮我?
编辑
- Microsoft Visual C++ 2010 Redistributable Package (x86) 已安装在 Windows XP 计算机上。
- 我正在将 DLL 编译为 32 位版本(不是调试)。
【问题讨论】:
标签: visual-studio-2010 visual-c++ dll 32bit-64bit atl