我怎样才能知道,如果另一个进程是64位? [英] How can I tell if another process is 64bit?

查看:95
本文介绍了我怎样才能知道,如果另一个进程是64位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个过程正在运行的应用程序。

I've got a Process for a running application.

如何,我可以告诉(不带P /调用,preferably),如果这个过程是64位?

How can I tell (without p/invoking, preferably) if that process is 64bit?

推荐答案

我不认为这是一个100%的最终办法知道没有的PInvoke。

I don't think there is a 100% definitive way to know without a PInvoke.

不过,这可能的工作,虽然一个项目是检查组已加载的模块( Process.Modules )。如果主模块(USER32,kernel32中,等...)来自WOW64目录,您运行的是64位的机器,然后有一个坚实的机会,它是一个32位进程。如果他们不来从WOW64目录中,这是一个64位的机器,那么很可能它是一个64位进程。

But one item which may work though is to inspect the set of loaded modules (Process.Modules). If the primary modules (user32, kernel32, etc ...) come from the Wow64 directory and you're running an a 64 bit machine then there is a solid chance it's a 32 bit process. If they don't come from the Wow64 directory and it's a 64 bit machine then it's likely it's a 64 bit process.

同样不明确的,但一个很好的估计。

Again not definitive but a good estimate.

这篇关于我怎样才能知道,如果另一个进程是64位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆