This topic has not yet been rated - Rate this topic

PropVariantCopy function

Applies to: desktop apps | Metro style apps

The PropVariantCopy function copies the contents of one PROPVARIANT structure to another.

Syntax

WINOLEAPI PropVariantCopy(
  __inout  PROPVARIANT *pvarDest,
  __in     const PROPVARIANT *pvarSrc
);

Parameters

pvarDest [in, out]

Pointer to an uninitialized PROPVARIANT structure that receives the copy.

pvarSrc [in]

Pointer to the PROPVARIANT structure to be copied.

Return value

S_OK

The copy was successfully completed.

STG_E_INVALID_PARAMETER

The variant has an unknown type.

Remarks

Copies a PROPVARIANT structure by value so the original pvarSrc and new pvarDest parameters may be freed independently with calls to PropVariantClear. PropVariantCopy does not free the destination as the VariantCopy function does. For nonsimple PROPVARIANT types such as VT_STREAM, VT_STORAGE, and so forth, which require a subobject, the copy is made by reference. The pointer is copied and IUnknown::AddRef is called on it. It is illegal to pass NULL for either pvarDest or pvarSrc.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Propidl.h

Library

Ole32.lib

DLL

Ole32.dll

See also

PROPVARIANT
PropVariantClear

 

 

Send comments about this topic to Microsoft

Build date: 2/15/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ