ClearPropVariantArray function (propvarutil.h)

Frees the memory and references used by an array of PROPVARIANT structures stored in an array.

Syntax

PSSTDAPI_(void) ClearPropVariantArray(
  [in] PROPVARIANT *rgPropVar,
  [in] UINT        cVars
);

Parameters

[in] rgPropVar

Type: PROPVARIANT*

Array of PROPVARIANT structures to free.

[in] cVars

Type: UINT

The number of elements in the array specified by rgPropVar.

Return value

No return value.

Remarks

This function releases the memory and references held by each structure in the array before setting the structures to zero.

This function performs the same action as FreePropVariantArray, but FreePropVariantArray returns an HRESULT.

Examples

The following example, to be included as part of a larger program, demonstrates how to use ClearPropVariantArray

// PROPVARIANT rgpropvar[5];
// Assume all 5 propvariants are initialized and valid.

ClearPropVariantArray(rgpropvar, ARRAYSIZE(rgpropvar));

Requirements

Requirement Value
Minimum supported client Windows XP with SP2, Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 with SP1 [desktop apps only]
Target Platform Windows
Header propvarutil.h
Library Propsys.lib
DLL Propsys.dll (version 6.0 or later)
Redistributable Windows Desktop Search (WDS) 3.0

See also

ClearVariantArray