theory
Member
From: Suomi
|
posted 2004-06-04 09:29:29 |
Reply -Delete |
It seems, Variant and BSTR wrappers have been written by different guys.
In _bstr_t Attach really attaches to the BSTR. In _variant_t it just make a copy and releases the original one which is disaster when you write put_something code.
CComVariant does not have such kind of problems, but ATL wrappers have another disease. CComBSTR::Copy makes a copy of the object while CComVariant::Copy does the opposit thing - it works like assignment operator.
| |