DVARIANT.Attachmethod
Attaches a variant to the class.
Syntax
FUNCTION Attach (BYVAL pvar AS VARIANT PTR) AS HRESULT
FUNCTION Attach (BYREF v AS VARIANT) AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
pvar | Pointer to the variant to attach. | |
v | The variant to attach. |
Return value
Returns S_OK (0) on success or an HRESULT error code on failure.
Description
Attaches a variant to the class.
Remarks
Marks the source variant as VT_EMPTY instead of clearing it with VariantClear because we aren't making a duplicate of the contents, but transferring ownership.
Reference
- Include file
DVARIANT.INC - Defined in AfxNova/DVARIANT.inc:2230
- Documented in COM/DVARIANT Class.md
- Topic: DVARIANT Class