I'm confused by the choices for COM smart pointers classes for C++ programming:
There's three four I'm aware of:
CCOMPtr
from ATL
_com_ptr_t
from the MS Com Support Classes
TComInterface
(because I'm using C++Builder 2009)
CCOMQIPtr
, (which I'd previously forgotten)
I've read about the error vs. exception handling differences of the first two, but TComInterface
seems totally undocumented. Both the first two seem to have gotchas or 'unexpected' behaviour, from what I can find.
Ideally, I'd like something that's clean and modern C++, but boost::com
doesn't exist as far as I know...
I need to control an application from another vendor. They provide a COM interface via a TLB file.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…