Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function calls PropVariantClearon each of the PROPVARIANTstructures in the rgvarsarray to make the value zero for each of the members of the array.

Syntax

WINOLEAPI FreePropVariantArray(
  ULONG 
cVariants,
  PROPVARIANT* 
rgvars
);

Parameters

cVariants

[in] Count of elements in the PROPVARIANT array ( rgvars).

rgvars

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

Return Values

The following table shows the return values for this function.

Value Description

S_OK

The variant types are recognized and all items that can be freed have been freed.

STG_E_INVALID_PARAMETER

One or more PROPVARIANTstructures has an unknown type.

Remarks

FreePropVariantArraycalls PropVariantClearon an array of PROPVARIANTstructures to clear all the valid members. All valid PROPVARIANTstructures are freed. If any of the PROPVARIANTstructures contain illegal VT types, valid members are freed and the function returns STG_E_INVALIDPARAMETER.

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

Requirements

Header oaidl.h
Library oleaut32.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also