--------------------------------------------------------------------------------------
BSTR
:Its header 4 bytes contain length of string (number of bytes, excluding the terminating null bytes ), and are followed by unicode string data.
API
SysAllocString
SysFreeString
SysStringLen
SysStringByteLen
MFC and ATL provide some smart classes:
CComBSTR, _bstr_t,
which will help you release memory.
--------------------------------------------------------------------------------------
Variant
API
VariantInit
VariantClear
VariantChangeType
VariantCopy
MFC and ATL provide some smart classes to govern VARIANT data type. They are:
CComVariant
_variant_t
COleVariant
<VARIANTARGs >
---------------------------------------------------------------------------------------