NAME

VariantCopyInd  (OLEAUT32.11)

SYNOPSIS

 HRESULT VariantCopyInd
 (
  VARIANT*          pvargDest,
  const VARIANTARG* pvargSrc
 )

DESCRIPTION

Copy a variant, dereferencing it if it is by-reference.

PARAMS

pvargDest [Out] Destination for copy.
pvargSrc [In] Source variant to copy.

RETURNS

Success: S_OK. pvargDest contains a copy of pvargSrc.

Failure: An HRESULT error code indicating the error.

NOTES

Failure: DISP_E_BADVARTYPE, if either variant has an invalid by-value type. E_INVALIDARG, if pvargSrc is an invalid by-reference type. E_OUTOFMEMORY, if memory cannot be allocated. Otherwise an HRESULT error code from SafeArrayCopy, IRecordInfo_GetSize, or IRecordInfo_RecordCopy, depending on the type of pvargSrc.

NOTES

- If pvargSrc is by-value, this function behaves exactly as VariantCopy.

- If pvargSrc is by-reference, the value copied to pvargDest is the pointed-to value.

- if pvargSrc == pvargDest, this function dereferences in place. Otherwise, pvargDest is always cleared using VariantClear before pvargSrc is copied to it. If clearing pvargDest fails, so does this function.

IMPLEMENTATION

Declared in "include/oleauto.h". gitlab.winehq.org/wine/wine/blob/master/include/oleauto.h

Implemented in "dlls/oleaut32/variant.c". gitlab.winehq.org/wine/wine/blob/master/dlls/oleaut32/variant.c

Debug channel "variant".


Copyright © 2024 The Wine Project. All trademarks are the property of their respective owners. Visit WineHQ for license details. Generated Dec 2024.