Monday, March 28, 2011

Corflags - Checking Your Application Compiled Platform (x86 vs x64)

The CorFlags Conversion tool allows you to configure the CorFlags section of the header of a portable executable image. It can also be use to check if your exe or dll is compiled under x86, x64 or Any CPU platform.

Corflags.exe come with VS2010. Use it as follow

1. Go to start menu, find your VS2010 application folder

2. In Visual Studio Tools, click on Visual Studio Command Prompt (2010)

3. A command prompt environment will be load. Type corflags will display something like follows

4. Navigate to your assembly location. Type, corflags your_assembly.exe. It will display the following

5. You will only be interested in PE and 32BIT flag. Refer to the following tables for their meanings

anycpu: PE = PE32 and 32BIT = 0
x86: PE = PE32 and 32BIT = 1
64-bit: PE = PE32+ and 32BIT = 0
6. As my assembly is compiled for x64 platform. Its PE is PE32+ and 32BIT is 0

No comments:

Post a Comment

Tomcat - removing server info

Below are the steps to remove Tomcat Server Information 1. Make sure Tomcat is not running 2. Navigate to "Tomcat Installation"...