PropVariantCopy  D4D6QK

Copies the contents of a PROPVARIANT structure to another.

HRESULT PropVariantCopy(

    PROPVARIANT * pDest

//Pointer to uninitialized PROPVARIANT that is filled on return

    PROPVARIANT *pvarg

//PROPVARIANT to be copied

   );

 

 

Parameters

pDest

[in, out] Pointer to an uninitialized PROPVARIANT18GW_GF structure that receives the copy.

pvarg

[in] Pointer to the PROPVARIANT to be copied.

 

Return Values

S_OK

The copy was successfully completed.

STG_E_INVALID_PARAMETER

The variant has an unknown type.

 

Remarks

Copies a PROPVARIANT by value so the original pvarg and new pDest may be freed independently with calls to PropVariantClear. For non-simple PROPVARIANT types such as VT_STREAM, VT_STORAGE, etc, which require a subobject, the copy is made by reference. The pointer is copied and AddRef is called on it. It is illegal to pass NULL for either pDest or pvarg.

See Also

PROPVARIANT, PropVariantClear