Help Center

DVARIANT.Detachmethod

Detaches the variant data from this class and transfers ownership to the passed variant.

COMmethodDVARIANT.INCdocumented

Syntax

FUNCTION Detach (BYVAL pvar AS VARIANT PTR) AS HRESULT
FUNCTION Detach (BYREF v AS VARIANT) AS HRESULT

Parameters

NameDescription
pvarPointer to the variant where the contents of the variant data will be moved.
vVariant 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