开发者

MacOSX: find out if a process (given a PID) is running in 32bit or in 64bit Intel mode

开发者 https://www.devze.com 2023-04-03 10:57 出处:网络
I have a PID and I want to find out if the process is running in 32bit or in 64b开发者_StackOverflow社区it Intel mode. How?I can do via NSRunningApplication.

I have a PID and I want to find out if the process is running in 32bit or in 64b开发者_StackOverflow社区it Intel mode. How?


I can do via NSRunningApplication.

[[NSRunningApplication runningApplicationWithProcessIdentifier:pid] executableArchitecture]

returns the Mach-O architecture constant.

This works only for GUI applications, though...

0

精彩评论

暂无评论...
验证码 换一张
取 消