我们如何检查二进制 EXE (PE) 是 COM Exe 还是 Win32 Exe?

发布于 2024-09-08 04:33:46 字数 278 浏览 0 评论 0原文

我需要以编程方式检查给定的 EXE 二进制文件是否是 COM、EXE 或 Win32.exe,这可以通过导入表实现吗?我应该在注册表中的哪个位置查找二进制文件是否已为 COM 注册?这是 EXE 特有的,因为 DLL 对我来说不是问题。

http://en.wikipedia.org/wiki/Component_Object_Model

I need to check programatically whether a given EXE binary is a COM, EXE or Win32.exe, is this possible through the Import Table? Where in the registry should I look to find out if a binary is registered for COM? This is specific to EXEs, as DLLs are not a problem for me.

http://en.wikipedia.org/wiki/Component_Object_Model

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天生の放荡 2024-09-15 04:33:46

如果您有 DLL,则可以请求其 DllGetClassObject(据我所知进程内 COM 服务器需要导出此函数)。

对于前任,恐怕你不能,至少不能100%确定。您只能应用启发式方法,例如检查 exe 的资源中是否有类型库(但请记住,这不是必需的)。

If you have a DLL you can ask for its DllGetClassObject (AFAIK inprocess COM servers are required to export this function).

For exes, I am afraid you cant, at least not 100% sure. you may only apply heuristics such as checking if exe has typelibs in its resources (but keep in mind that it is not required).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文