Detecting an x64 app running on ARM64

FredAaron-MSFT 1 Reputation point
2021-01-15T21:32:38.017+00:00

I need to distinguish a x64 and ARM64 process running on Windows 10 or greater in C++. Calling IsWow64Process2 on the x64 process returns processMachine == IMAGE_FILE_MACHINE_UNKNOWN correctly indicating the process is not a wow process and nativeMachine == IMAGE_FILE_MACHINE_ARM64 correctly indicating this is an ARM64 system. In an example, the process architecture shown in Task manager says "ARM64 (x64 compatibility)" for the process. What is the preferred way to determine a process running is x64 and not ARM64?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,440 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,554 questions
{count} votes