views:

110

answers:

1

I'm writing an application that interacts with other processes on a x64 Vista machine. In order to do this it will need to know if the other process is running in 32bit or 64bit mode. How can I detect this?

+4  A: 

You'll need to get a process handle first, then call IsWow64Process(). If it's a 32-bit process, it'll return false.

Note that you'll also have to call GetProcAddress() to make sure that IsWow64Process() is even available in case you're not even running on a 64-bit Windows.

Cheers!
Sean

brlcad