.\" -*- nroff -*- .\" Generated file - DO NOT EDIT! .TH VariantCopy 3w "Oct 2012" "Wine API" "Wine API" .SH NAME \fBVariantCopy\fR (OLEAUT32.10) .SH SYNOPSIS HRESULT VariantCopy ( VARIANTARG* \fIpvargDest\fR, VARIANTARG* \fIpvargSrc\fR ) .SH DESCRIPTION .PP Copy a variant. .SH PARAMS \fIpvargDest\fR \fB[Out]\fR Destination for copy. .PP \fIpvargSrc\fR \fB[In]\fR Source variant to copy. .PP .SH RETURNS .PP \fBSuccess:\fR \fBS_OK\fR. \fIpvargDest\fR contains a copy of \fIpvargSrc\fR. .PP \fBFailure:\fR \fBDISP_E_BADVARTYPE\fR, if either variant has an invalid type. \fBE_OUTOFMEMORY\fR, if memory cannot be allocated. Otherwise an \fBHRESULT\fR error code from \fBSafeArrayCopy(3w)\fR, \fBIRecordInfo_GetSize(3w)\fR, or \fBIRecordInfo_RecordCopy(3w)\fR, depending on the type of \fIpvargSrc\fR. .SH NOTES .PP \fB-\fR If \fIpvargSrc\fR == \fIpvargDest\fR, this function does nothing, and succeeds if \fIpvargSrc\fR is valid. Otherwise, \fIpvargDest\fR is always cleared using VariantClear() before \fIpvargSrc\fR is copied to it. If clearing \fIpvargDest\fR fails, so does this function. .PP \fB-\fR \fBVT_CLSID\fR is a valid type type for \fIpvargSrc\fR, but not for \fIpvargDest\fR. .PP \fB-\fR For by-value non-intrinsic types, a deep copy is made, i.e. The whole value is copied rather than just any pointers to it. .PP \fB-\fR For by-value object types the object pointer is copied and the objects reference count increased using \fBIUnknown_AddRef(3w)\fR. .PP \fB-\fR For all by-reference types, only the referencing pointer is copied. .SH IMPLEMENTATION .PP Declared in \fB"oleauto.h"\fR. .PP Implemented in \fB"dlls/oleaut32/variant.c"\fR. .PP Debug channel \fB"variant"\fR.