다음을 통해 공유


CComVariant::Attach

Safely clears the current contents of the CComVariant object, copies the contents of pSrc into this object, then sets the variant type of pSrc to VT_EMPTY.

HRESULT Attach( 
   VARIANT* pSrc  
);

Parameters

  • pSrc
    [in] Points to the VARIANT to be attached to the object.

Return Value

A standard HRESULT value.

Remarks

Ownership of the data held by pSrc is transferred to the CComVariant object.

Requirements

Header: atlcomcli.h

See Also

Reference

CComVariant Class

CComVariant::Detach