Solved

How can I tell if an app is 32 or 64 bit?

Posted on 2014-12-16
7
143 Views
Last Modified: 2014-12-17
using Visual Studio, How can I tell if an app is 32 or 64 bit?
0
Comment
Question by:HLRosenberger
  • 3
  • 2
  • 2
7 Comments
 
LVL 35

Expert Comment

by:Miguel Oz
Comment Utility
IF you're using .NET 4.0 or greater, use the new Is64BitProcess Property:

Environment.Is64BitProcess

Open in new window

0
 
LVL 1

Author Comment

by:HLRosenberger
Comment Utility
Let me clarify - Isn't an executable built for either 32 or 64 bit?   Then I would assume that a 32-bit exe can run in 64 bit space, but not vice versa, of course.
0
 
LVL 35

Expert Comment

by:Miguel Oz
Comment Utility
You can build (platform) as any CPU, and .NET run time will pick up how to run your app based on the OS.
I think you are after the compile platform info. Go to project properties, compile tab and on the top you will find platform combo box.
From memory I do not think you can build vb.net apps for x86 or x64, only any CPU is the option available.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 32

Accepted Solution

by:
it_saige earned 500 total points
Comment Utility
Not true Miguel.  You can compile any project of any language to any specifications you, as the developer, require.

As to the answer to your question.  As a rule a VS project can be built for a specific platform or all platforms.Capture.JPGChoosing the platform tells the compiler where to put the assemblies based on the Build output path.
You can choose your Advanced Compile Options to determine the CPU type to build for; x86, x64, Itanium or AnyCPU.Capture.JPGAnd you can add/edit the configuration by using the configuration manager.Capture.JPGCapture.JPG
By definition a project built for a specific platform can only run on a platform that:
A. Explicitly meets the requirements to run the project output.
B. Contains an emulator that can replicate the requirements to run the project output.

This is essentially how Windows x64 OS's can run 32-bit applications.  However, you are right, a 32-bit application can run in a 64-bit environment, but a 64-bit application cannot run in a 32-bit environment.

-saige-
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
Comment Utility
Thanks!  that's what I was looking for.
0
 
LVL 1

Author Comment

by:HLRosenberger
Comment Utility
Followup question - If under Platform I only have the Active x86 option, what does that mean?
0
 
LVL 32

Expert Comment

by:it_saige
Comment Utility
That just means that you do not have a configuration built for x64, Itanium or Any CPU...  Which is why I posted that you can add/edit the configurations...

-saige-
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now