title: Getting CLSID for a DLL file?
body: <p>I want to create a small app to add and remove user defined context menu entries from the registry. To make this, somehow I need to get the CLSID of an arbitrary DLL so I can back up previous entries if they exist before writing new ones. </p>
  
  <p>Although <code>regsrv32</code> somehow manages to create this magical number, I didn't find any way to get that number myself.</p>
  
  <p>I hope there is something better than this:</p>
  
  <ol>
  <li>scanning registry for the DLL name</li>
  <li>if not found, register it, scan again, and then unregister it again</li>
  </ol>
  
  <p>If the DLL has been renamed, I can see a possibility for problems.</p>