惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

月光博客
月光博客
J
Java Code Geeks
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
P
Proofpoint News Feed
U
Unit 42
B
Blog
宝玉的分享
宝玉的分享
腾讯CDC
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
博客园 - Franky
博客园 - 三生石上(FineUI控件)
人人都是产品经理
人人都是产品经理
Martin Fowler
Martin Fowler
博客园_首页
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
云风的 BLOG
云风的 BLOG
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
博客园 - 叶小钗

博客园 - Mr东方欲晓

软件测试经验与教训 SQL优化技术分析-4:其他 SQL优化技术分析-3:SQL语句索引的利用 SQL优化技术分析-2:SQL书写的影响 SQL优化技术分析-1:操作符优化 如何做好一个Sprint Demo 每日Scrum站会实践推荐 Linux常见查看硬件信息指令 MS SQLServer 2008数据库处于SUSPECT情况下的处理 ALM损坏后的恢复步骤 WEB页面中常见的四种控件的必须的测试 敏捷测试模式之Scrum及其实践 CentOS如何查看硬盘品牌型号等具体信息 WoW64 在未安装 Outlook 的情况下创建 MAPI 配置文件 Any CPU vs x86 vs x64 Solution Platforms 电脑的32位与64位是指的什么 How do exes/dlls generated with the /platform:x switch interact? C# Compiler Options
64-bit Applications
Mr东方欲晓 · 2011-02-24 · via 博客园 - Mr东方欲晓

When you compile an application, you can specify that it should run on a Windows 64-bit operating system either as a native application or under WOW64. WOW64 is a compatibility environment that enables a 32-bit application to run on a 64-bit system. WOW64 is included in the system.

All applications that are built on the .NET Framework versions 1.0 or 1.1 are treated as 32-bit applications and are always executed under WOW64 on the 32-bit common language runtime (CLR) on a 64-bit operating system. In addition, 32-bit-specific applications that are built on the .NET Framework version 3.5 would run under WOW64 on 64-bit systems.

Visual Studio installs the 32-bit version of the CLR on an x86 computer, and both the 32-bit version and the appropriate 64-bit version of the CLR on a 64-bit Windows computer. (Because Visual Studio 2008 is a 32-bit application, when it is installed on a 64-bit system, it runs under WOW64.)

Note Note:

Because of the design of x86 emulation and the WOW64 subsystem for the Itanium processor family, applications are restricted to execution on one processor. These factors reduce the performance and scalability of 32-bit .NET Framework applications that run on Itanium-based systems. We recommend that applications that use the .NET Framework 1.1 be used for interactive, client applications and not for applications that demand high performance or scalability, for example, high-load ASP.NET applications. If you can, use the , which includes native 64-bit support for Itanium-based systems, for increased performance and scalability.

When you run a 64-bit managed application on a 64-bit Windows operating system, you can create an object of no more than 2 gigabytes (GB).

Many assemblies run identically on both the 32-bit CLR and the 64-bit CLR. However, some programs may behave differently, depending on the CLR, for one or more of the following reasons:

  • Structs that contain members that change size depending on the platform, such as any pointer type.

  • Pointer arithmetic that includes constant sizes.

  • Incorrect platform invoke or COM declarations that use Int32 for handles instead of IntPtr.

  • Casting IntPtr to Int32.

For more information about how to port a 32-bit application to run on the 64-bit CLR, see Migrating 32-bit Managed Code to 64-bit on the MSDN website.

By default, when you use the .NET Framework 2.0 to build an application on either a 32-bit or a 64-bit computer, the application will run on a 64-bit computer as a native application (that is, not under WOW64). The following table lists documents that teach how to use Visual Studio compilers to create 64-bit applications that will run as native, under WOW64, or both.

To determine whether an .exe file or .dll file is meant to run only on a specific platform or under WOW64, use corflags.exe at the command prompt. You can also use corflags.exe to change the platform status of an .exe file or .dll file. For more information, see CorFlags Conversion Tool (CorFlags.exe). The CLR header (or COM+ Runtime header) of a Visual Studio assembly has the major runtime version number set to 2 and the minor runtime version number set to 5 (0 in Visual Studio .NET 2003 assemblies). Applications that have the minor runtime version set to 0 are treated as legacy applications and are always executed under WOW64.

To programmatically query an .exe or .dll to see whether it is meant to run only on a specific platform or under WOW64, use the GetPEKind method.