如何判断另一个进程是否为 64 位?

编程入门 行业动态 更新时间:2024-10-27 09:35:27
本文介绍了如何判断另一个进程是否为 64 位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个流程正在运行的应用程序.

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 位?

本文发布于:2023-11-11 06:39:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577655.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何判断   进程

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!