Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

32-bit vs 64-bit: Do I have to build my application specifically for either platform?

Posted on 2006-10-26
5
292 Views
Last Modified: 2012-06-27
Hello all,

I've been  building VB.NET rich applications, both from Visual Studio 2005 and the VB Express edition.

When I build an application on a 32-bit machine, and then copy it to a 64-bit box, does the .NET framework automatically run it as a 64-bit application, or is it stuck at 32?

Seems like it should automatically work as a 64-bit app, but I'm not sure.

Any clarification would be greatly appreciated.
Thanks!

David
0
Comment
Question by:Inward_Spiral
  • 2
5 Comments
 
LVL 63

Expert Comment

by:Fernando Soto
ID: 17813546
It runs in a mode called WOW64

Here are some links to help you understand what happens.

WOWing Your 32-Bit Applications with 64-Bit Windows Part 1
http://www.devx.com/amd/Article/20342?type=kbArticle&trk=MSCP

WOWing Your 32-Bit Applications with 64-Bit Windows, Part 2
http://www.devx.com/amd/Article/20367?type=kbArticle&trk=MSCP

Migrating 32-bit Managed Code to 64-bit
http://msdn2.microsoft.com/en-us/library/ms973190.aspx

Fernando
0
 

Author Comment

by:Inward_Spiral
ID: 17813826
I found this blurb in the "Migrating 32-bit Managed Code to 64-bit" article:

 - 64-bit—denotes that the developer has built the assembly specifically targeting a 64-bit process.
 - 32-bit—denotes that the developer has built the assembly specifically targeting a 32-bit process.
    In this instance the assembly will run in WoW64.
 - Agnostic—denotes that the developer built the assembly with Visual Studio 2005, code-named "Whidbey".
   or later tools and that the assembly can run in either 64-bit or 32-bit mode. In this case, the 64-bit Windows loader  
   will run the assembly in 64-bit.
 - Legacy—denotes that the tools that built the assembly were "pre-Whidbey". In this particular case the assembly will
   be run in WoW64.

Since I'm developing in Visual Studio 2005 (or in one case, VB 2005 Express), I think my application falls under the "Agnostic" category. So, I shouldn't have to change anything for it to be able to work as a 64-bit application, correct?

0
 
LVL 63

Accepted Solution

by:
Fernando Soto earned 100 total points
ID: 17814149
Not the second paragraph when it talks about being 100% type safe

Keep in mind that a developer marking an assembly as Win64 determined that all dependencies of the application would execute in 64-bit mode. A 64-bit process cannot use a 32-bit component in process (and a 32-bit process cannot load a 64-bit component in process). Keep in mind that the ability for the system to load the assembly into a 64-bit process does not automatically mean that it will execute correctly.

So, we now know that an application comprised of managed code that is 100% type safe can be copied (or xcopy deploy it) to a 64-bit platform and have it JIT and run successfully with .NET in 64-bit mode.

However, we often see situations that aren't ideal, and that brings us to the main focus of this paper, which is to increase awareness of the issues related to migrating.

You can have an application that isn't 100% type safe and that is still able to run successfully in 64-bit under .NET. It will be important for you to look at your application carefully, keeping in mind the potential issues discussed in the following sections and make the determination of whether you can or cannot run successfully in 64-bit.

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question