title: CoCreateInstance fails with 0x80131500
body: <p>We're trying to access .NET COM library from unmanaged C code.</p>
  
  <pre><code>HRESULT hr = CoCreateInstance(__uuidof(XYZClient::XClient), NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&amp;pCl));
  </code></pre>
  
  <p>The result of hr is <code>0x80131500</code> which means that exception was thrown by COM library.
  But when debugging, it doesn't even goes into constructor of our .NET class.</p>
  
  <p>This works fine when called from .NET via COM.</p>
  
  <p>Any ideas how to at least get exception message?</p>
  
  <p>EDIT: It works just fine on Windows XP but fails on Win7 x64.</p>