title: Check Portable Executable (PE) file for COM signature
body: <p>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.</p>
  
  <p>Short of <a href="https://stackoverflow.com/a/2681468/938668">Andy's suggestions</a> on <a href="https://stackoverflow.com/q/2681313/938668">this</a> question, is there a way to figure out the needed without having to:</p>
  
  <ul>
  <li>Load the library and check for DllRegisterServer/DllUnregisterServer exports.</li>
  <li>Attempt registration with regsvr32 while catching exceptions?</li>
  </ul>
  
  <p>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.</p>