Detect another process's bitness (in Windows)

2020-03-26 05:50发布

问题:

How can I detect whether another process is running as 32/64 bit in Windows? I know how to do this for my own process, but not for a different process. A tip or solution in any language would be fine. Thanks!

回答1:

Check out IsWow64Process.



回答2:

Windows XP SP2 also has IsWow64Process(). So, you can't have the guarantee that you are working under Windows 64-bits when you find IsWow64Process() in kernel32.dll.

It means that you cannot say anything when you get FALSE as result. You have to know the OS bitness or your process bitness to decide how to interpret FALSE.