문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top