我有一个流程正在运行的应用程序.
I've got a Process for a running application.
我如何判断(最好不使用 p/invoking)该进程是否为 64 位?
How can I tell (without p/invoking, preferably) if that process is 64bit?
推荐答案我认为没有 PInvoke 就没有 100% 确定的方法.
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 位?
发布评论