Click here to Skip to main content
13,139,515 members (51,083 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


3 bookmarked
Posted 12 Oct 2010

Getting Processor Architecture in x86 and x64 Bit Platforms

, 12 Oct 2010
Rate this:
Please Sign up or sign in to vote.
Getting Processor architecture in x86 and x64 bit platforms

GetSystemInfo provides the basic system information and processor architecture of the underlying platform. This API can be used successfully in both x64 and x86 platforms. But, under 64-bit WIndows, we can run 32 bit Applications (WOW64). If a WOW64 process calls GetSystemInfo API, it will return the processor architecture as x86. Of course, it should be the way. If this API acts otherwise, there could be compatibility problems that may arise and the application could act weird and show undefined behavior.

If the WOW64 process wants to know the original platform it’s running, it must call GetNativeSystemInfo. When do we have to use this? I've a real world example. When we spawn process explorer (procexp.exe, it realizes the underlying platform and creates another EXE procexp64.exe (64bit version) to iterate all process information in the system. Note that the GetNativeSystemInfo needs to be called only if your 32bit application wants to run under 64 bit platform and needs to care about the true underlying platform. In all other cases, call GetSystemInfo, which works across platforms uniquely. See the snippet below:

To know more about the different processor architectures at the abstract level, please do check one of my previous posts.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Sarath C
Technical Lead
India India
Software Developer

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170915.1 | Last Updated 12 Oct 2010
Article Copyright 2010 by Sarath C
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid