DVARIANT.Detachmethod
Detaches the variant data from this class and transfers ownership to the passed variant.
Syntax
FUNCTION Detach (BYVAL pvar AS VARIANT PTR) AS HRESULT
FUNCTION Detach (BYREF v AS VARIANT) AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
pvar | Pointer to the variant where the contents of the variant data will be moved. | |
v | Variant where the contents of the variant data will be moved. |
Return value
Returns S_OK (0) or an HRESULT error code.
Description
Detaches the variant data from this class and transfers ownership to the passed variant.
Remarks
This method transfers ownership of the underlying variant and marks it as empty.
Reference
- Include file
DVARIANT.INC - Defined in AfxNova/DVARIANT.inc:2272
- Documented in COM/DVARIANT Class.md
- Topic: DVARIANT Class