I am using ATL (VS2008, so ATL9 IIRC) to create COM objects and have been using the CComVariant
class (defined in atlcomcli.h
) to manage VARIANT
types. However, there is also another VARIANT
wrapper called _variant_t
. Is there any difference between CComVariant
and _variant_t
and which one should I be using?
Similarly, there are two BSTR
wrappers available - CComBSTR
and _bstr_t
. Again, which should I prefer and why?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…