How do exes/dlls generated with the /platform:x switch interact?
来源:互联网 发布:windows遇见关键问题 编辑:程序博客网 时间:2024/05/16 02:56
I received a question about this recently, so i figured i'd elaborate here with a little example...
Let's assume we have the following three dlls:
anycpu.dll -- compiled "any cpu"
x86.dll -- compiled "x86"
x64.dll -- compiled "x64"
And the following three exes:
anycpu.exe -- compiled "any cpu"
x86.exe -- compiled "x86"
x64.exe -- compiled "x64"
What happens if you try to use these exes and dlls together? We have to consider two possible scenarios, running on a 32-bit machine and running on a 64-bit machine...
On a 32-bit x86 machine:
anycpu.exe -- runs as a 32-bit process, can load anycpu.dll and x86.dll, will get BadImageFormatException if it tries to load x64.dll
x86.exe -- runs as a 32-bit process, can load anycpu.dll and x86.dll, will get BadImageFormatException if it tries to load x64.dll
x64.exe -- will get BadImageFormatException when it tries to run
On a 64-bit x64 machine:
anycpu.exe -- runs as a 64-bit process, can load anycpu.dll and x64.dll, will get BadImageFormatException if it tries to load x86.dll
x86.exe -- runs as a 32-bit process, can load anycpu.dll and x86.dll, will get BadImageFormatException if it tries to load x64.dll
x64.exe -- runs as a 64-bit process, can load anycpu.dll and x64.dll, will get BadImageFormatException if it tries to load x86.dll
转自:http://blogs.msdn.com/b/joshwil/archive/2005/04/08/406567.aspx
- How do exes/dlls generated with the /platform:x switch interact?
- DLLs And Exes
- How do adaptive cursor sharing and SQL Plan Management interact?
- how to interact with java object in cpp
- How to Do Everything with Mac OS X Panther
- How do I unzip tarballs with the 'bz2' extension?
- PowerShell: Interact with SharePoint in the fastest way possible
- HOWTO make ns-3 interact with the real world
- How to bypass the WinSxS for CRT/MFC/ATL DLLs
- How to bypass the WinSxS for CRT/MFC/ATL DLLs
- how to do with the special characters in the xml data
- Interact uploadify3.1 with jsp
- Cooking with the NetBeans Platform
- Debugging with the Eclipse platform
- Debugging with the Eclipse Platform
- Cheap Polo Ralph Lauren Everything that is important is definitely that you really interact with the
- DLLs with Libtool
- How to remove the //TODO comments from auto-generated code
- java简单socket编程
- 内存管理
- ubuntu 升级 upgrade
- Cocoa 解析xml文件
- aCC 编译器编译选项
- How do exes/dlls generated with the /platform:x switch interact?
- QT 设置程序界面风格
- POJ 3295
- Flash发布iOS应用全攻略(一)——如何在Flash里发布iOS应用
- Flash发布iOS应用全攻略(二)——如何成为一个合法的iOS开发者
- Flash开发iOS应用全攻略(三)——如何使用iOS开发者授权以及如何申请证书
- Flash开发iOS应用全攻略(四)——如何为iTunes Connect准备应用
- Flash开发iOS应用全攻略(五)——如何上传应用到iTunes Connect
- C#存储过程设置返回值位数