检查便携式可执行文件(PE)文件的COM签名 [英] Check Portable Executable (PE) file for COM signature

查看:189
本文介绍了检查便携式可执行文件(PE)文件的COM签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要以编程方式检查任意Dll,看看它们是否是inproc COM服务器。换句话说,可以使用regsvr32 / DllRegisterServer在当前系统上注册。

I need to programatically check arbitrary Dlls to see whether they are inproc COM servers. In other words, can they be registered on the current system using regsvr32 / DllRegisterServer.

关于问题的Andy的建议是有办法找出所需的,而不必

Short of Andy's suggestions on this question, is there a way to figure out the needed without having to:


  • 加载库并检查DllRegisterServer / DllUnregisterServer导出。

  • 尝试使用regsvr32注册捕获异常?

PE格式中必须有指示需要的东西。我的假设是'regsvr32'已经在内部。感谢任何输入。

There must be something in the PE format that indicates the needed. My assumption is that 'regsvr32' already does this internally. Would appreciate any input.

推荐答案

否。使DLL成为COM对象的唯一的东西是它导出 DllGetClassObject 。唯一可以注册的是它导出 DllRegisterServer

No. The only thing that makes a DLL a COM object is that it exports DllGetClassObject. The only thing that makes it registerable is that it exports DllRegisterServer.

这篇关于检查便携式可执行文件(PE)文件的COM签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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