我想指出的是,MSVCR80.DLL是Visual Studio 2005中,沒有Visual Studio 2010中您的代碼所表示的CRT運行。
winsxs amd64_xxx中的DLL是win64 dll。這裏是DLL的我的系統上DUMPBIN:
C:\Windows\winsxs\amd64_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1833_none_88de3f632fb047bc>dumpbin /headers msvcr80.dll Microsoft (R) COFF/PE Dumper Version 10.00.40219.01 Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file msvcr80.dll
PE signature found
File Type: DLL
FILE HEADER VALUES
8664 machine (x64)
6 number of sections
482BAB54 time date stamp Thu May 15 15:17:40 2008
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
2022 characteristics
Executable
Application can handle large (>2GB) addresses
DLL
下面是32位版本的一個DUMPBIN:
C:\Windows\winsxs\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.1833_none_d08b763a442c70c2>dumpbin /headers msvcr80.dll
Microsoft (R) COFF/PE Dumper Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file msvcr80.dll
PE signature found
File Type: DLL
FILE HEADER VALUES
14C machine (x86)
5 number of sections
482BB294 time date stamp Thu May 15 15:48:36 2008
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
2102 characteristics
Executable
32 bit word machine
DLL
而對於答案2)
32位應用程序無法加載64位的DLL和64位應用程序無法加載32位的DLL。
有關詳細信息,請參閱MSDN 64bit Process Interoperability。
在此處關閉循環 - 發佈此消息後不久,我發現MS可再發行版的64位版本是_msvcr100.dll_,並且包含在最近版本的Microsoft SDK下載中。 – ryyker
否....「msvcr80.dll」是Visual Studio 2005的(發行版)運行時,WinSxS目錄中應該有32位。我不知道2005年是否有64位版本,但如果是,它會在系統目錄中。 「msvcr100.dll」是Visual Studio 2010的(發行版)運行時,它也應該在WinSxS中有32位,在系統目錄中有64位。 –
@MooingDuck - 不知道你的評論中引用了什麼「不....」。我已經使用msvcr100.dll,並從可下載的Microsoft Windows 7 SDK中獲得。我同意它與Visual Studios等開發環境一起分發,但也可以在SDK中使用。 (我在大約一個小時前編輯過這篇文章,只是指出在沒有完整的MS Visual Studios的情況下,人們可以在哪裏得到64位msvcrxxx.dll) – ryyker