FreePropVariantArray function (combaseapi.h)

The FreePropVariantArray function calls PropVariantClear on each of the PROPVARIANT structures in the rgvars array to make the value zero for each of the members of the array.


HRESULT FreePropVariantArray(
  [in] ULONG       cVariants,
  [in] PROPVARIANT *rgvars


[in] cVariants

Count of elements in the PROPVARIANT array (rgvars).

[in] rgvars

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 structure (thus tagging them as VT_EMPTY).

Return value

This function returns HRESULT.


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

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


Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header combaseapi.h
Library Ole32.lib
DLL Ole32.dll

See also