title: How to prevent crashing if com dll isnt registered
body: <p>From some old c++ code im trying to use a com dll, it works fine when the dll is registered, but it crahses if the dll isnt registered.</p>
  
  <p>// Initialize COM.
  HRESULT hr = CoInitialize(NULL);</p>
  
  <p>IGetTestPtr ptest(__uuidof(tester));</p>
  
  <p><em>"Use method from the dll"</em></p>
  
  <p>// Uninitialize COM.
  CoUninitialize();</p>
  
  <p>Is it anyway to check if the dll has been registered, before calling IGetTestPtr ptest(__uuidof(tester))? </p>
  
  <p>Or what is the correct way to prevent the crash?</p>