In a way similar to the FileGetVersion command?
I wrote a function that can achieve this, but only when the program *is* running.
Also is there a better name for the function below, 'get bits', 'get architecture', 'get image type', 'get bitness'?
I would be grateful for any ideas and related terms.
Also, I don't really need it, but it would be good to mention for both methods, if it could be determined whether a program was 16-bit or any other n-bit.
Code: Select all
JEE_ProcessGetBits(vPID)
{
if !A_Is64bitOS
return "x86"
hProc := DllCall("kernel32\OpenProcess", UInt,0x400, Int,0, UInt,vPID, Ptr)
DllCall("kernel32\IsWow64Process", Ptr,hProc, IntP,vIsWow64Process)
DllCall("kernel32\CloseHandle", Ptr,hProc)
if vIsWow64Process
return "x86"
return "x64"
}