ClearVariantArray function (propvarutil.h)

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

Syntax

PSSTDAPI_(void) ClearVariantArray(
  [in] VARIANT *pvars,
  [in] UINT    cvars
);

Parameters

[in] pvars

Type: VARIANT*

Array of VARIANT structures to free.

[in] cvars

Type: UINT

The number of elements in the array specified by pvars.

Return value

No return value.

Remarks

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

Examples

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

// VARIANT rgpropvar[5];
// Assume all 5 variants are initialized and valid.

ClearVariantArray(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

ClearPropVariantArray

FreePropVariantArray