FreePropVariantArray  IK2248

Calls PropVariantClearQJIRQK 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 PROPVARIANT18GW_GF 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.

See Also

PropVariantClear