Determine whether a program is 64-bit or 32-bit

Source: Internet
Author: User
Tags hex code
1. Use CodeDetermine if (intptr. size = 4) {// 32-bit} else if (intptr. size = 8) {// 64-bit

}

2. use the code to identify other processes that are running http://stackoverflow.com/questions/1953377/how-to-know-a-process-is-32-bit-or-64-bit-programmatically 3. no code to determine any EXE, see the second reply http://blogs.technet.com/ B /windowshpc/archive/2009/03/27/how-to-tell-if-a-exe-file-is-a-32-bit-or-64-bit-application-using-dumpbin.aspx if you have a hex editor program, just open your file with it and shortly after the Standard Header intro stuff (like "This program cannot be run in DOS mode... ") You will see either" pe .. L "(HEX Code: 50451_4c) = 32 bitor

"Pe .. d Pipeline" (HEX Code: 504500006486) = 64 bit

In fact, a common text editor (such as NotePad) can be used to search for the PE and the following results (64-bit) (32-bit) will be published through wiz.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.