How can I determine if a specified process is 32 or 64 bit on Windows, Mac and Linux.
On Linux and Mac I have a pid of the process. I am thinking that if the system itself is 64 bit then the apps should be 64 bit, same with 32 bit. But I heard that 64 bit Linux and Mac can also run 32 bit applications. What can I do to be sure?
On Windows I have a Handle to the process. Currently I am using IsWow64Process. Is this correct? (Edit: yes it is correct but needs to be used with GetNativeSystemInfo to see if the OS is 64 bit).
EDIT: For Mac see this question.