title: Which COM smart pointer classes to use?
body: <p>I'm confused by the choices for COM smart pointers classes for C++ programming:</p>
  
  <p>There's <strike>three</strike> four I'm aware of:</p>
  
  <ul>
  <li><code>CCOMPtr</code> from ATL</li>
  <li><code>_com_ptr_t</code> from the <a href="http://msdn.microsoft.com/en-us/library/5yb2sfxk.aspx" rel="nofollow">MS Com Support Classes</a></li>
  <li><code>TComInterface</code> (because I'm using C++Builder 2009)</li>
  <li><code>CCOMQIPtr</code>, (which I'd previously forgotten)</li>
  </ul>
  
  <p>I've read about the error vs. exception handling differences of the first two, but <code>TComInterface</code> seems totally undocumented. Both the first two seem to have gotchas or 'unexpected' behaviour, from what I can find.</p>
  
  <p>Ideally, I'd like something that's clean and modern C++, but <code>boost::com</code> doesn't exist as far as I know...</p>
  
  <p>I need to control an application from another vendor. They provide a COM interface via a TLB file.</p>