Check Portable Executable (PE) file for COM signature

只谈情不闲聊 提交于 2019-12-14 04:05:42

问题


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.

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

  • Load the library and check for DllRegisterServer/DllUnregisterServer exports.
  • Attempt registration with regsvr32 while catching exceptions?

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.


回答1:


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.



来源:https://stackoverflow.com/questions/18925735/check-portable-executable-pe-file-for-com-signature

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!