FreePropVariantArray

Calls PropVariantClear on each of the PROPVARIANTs in the rgvar array to zero the value of each of the members of the array.

HRESULT FreePropVariantArray(
  ULONG cVariant,       //Count of elements in the structure
  PROPVARIANT* rgvar[]  //Pointer to the PROPVARIANT structure
);
 

Parameters

cVariant
[in] Count of elements in the PROPVARIANT array (rgvar).
rgvar
[in] Pointer to an initialized array of PROPVARIANT structures for which any deallocatable elements are to be freed. On exit, all zeroes are written to the PROPVARIANT (thus tagging them as VT_EMPTY).

Return Values

S_OK
The variant types are recognized and all items that can be freed have been freed.
STG_E_INVALID_PARAMETER
One or more PROPVARIANTs has an unknown type.

Remarks

FreePropVariantArray calls PropVariantClear on an array of PROPVARIANTs to clear all the valid members. All valid PROPVARIANTS are freed. If any of the PROPVARIANTs contain illegal VT-types, valid members are freed and the function returns STG_E_INVALIDPARAMETER.

Passing NULL for rgvar is legal, and produces a return code of S_OK.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in objidl.h.
  Import Library: Included as a resource in ole32.dll.

See Also

PropVariantClear