GetBinaryType(Application){ ;;获取exe文件位数,Application:文件路径
static Type := {0 : "32BIT", 1: "DOS", 2: "WOW", 3: "PIF", 4: "POSIX", 5: "OS216", 6: "64BIT"}
if !(DllCall("kernel32\GetBinaryType" (A_IsUnicode ? "W" : "A"), "str", Application, "uint*", BinaryType))
return 0
return Type[BinaryType]
}
ProcessGetBits(vPID){ ;;获取进程位数
if !A_Is64bitOS
Return 86
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 86
Return 64
}
暂无讨论,说说你的看法吧