主题:_variant_t构造函数问题
_variant_t( IUnknown* pIUknownSrc, bool fAddRef = true )
这个构造函数是什么功能?
msdn英文如下,从一个COM接口指针构造一个VT_UNKNOWN类型的_variant_t对象,如果 fAddRef值为真.....................后面部分不太懂,请指教!
Constructs a _variant_t object of type VT_UNKNOWN from a COM interface pointer. If fAddRef is true, then AddRef is called on the supplied interface pointer to match the call to Release that will occur when the _variant_t object is destroyed. It is up to you to call Release on the supplied interface pointer. If fAddRef is false, this constructor takes ownership of the supplied interface pointer; do not call Release on the supplied interface pointer.
这个构造函数是什么功能?
msdn英文如下,从一个COM接口指针构造一个VT_UNKNOWN类型的_variant_t对象,如果 fAddRef值为真.....................后面部分不太懂,请指教!
Constructs a _variant_t object of type VT_UNKNOWN from a COM interface pointer. If fAddRef is true, then AddRef is called on the supplied interface pointer to match the call to Release that will occur when the _variant_t object is destroyed. It is up to you to call Release on the supplied interface pointer. If fAddRef is false, this constructor takes ownership of the supplied interface pointer; do not call Release on the supplied interface pointer.