title: Calling CoInitialize/CoUnInitialize
body: <p>i have a .NET application which is using a COM component using COM Interop, The Component instanciate itself and interface pointer is returned in an API cal to the .net wrapper,  at a later point in the application flow a call is made to the COM component. </p>
  
  <pre><code>//Pseudo code 
  
  //CLISD_ITEM is a another CoClass housed by this COM component, the component is a STA based dll 
  
  HRESULT GetItem(ITem **ptr)
  
  {
  
  HRESULT hr = CoCreateInstance(CLSID_ITEM.....,....(void **) &amp;pItem);
  
  pItem-&gt;QI(ptr);
  
  }
  </code></pre>
  
  <p>my question is should i call CoInitialize and CoUninitialize() inside the function GetItem, as of now i not making these calls and  the code seems to be working fine, but there are reports of some intermittent crash when calling CoCreateInstance.</p>
  
  <p>if anyone can help me here.</p>