ClearVariantArray function

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

Syntax


VOID ClearVariantArray(
  _In_ VARIANT *pvars,
  _In_ UINT    cVars
);

Parameters

pvars [in]

Type: VARIANT*

Array of VARIANT structures to free.

cVars [in]

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

Minimum supported client

Windows XP with SP2, Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 with SP1 [desktop apps only]

Redistributable

Windows Desktop Search (WDS) 3.0

Header

Propvarutil.h

Library

Propsys.lib

DLL

Propsys.dll (version 6.0 or later)

See also

ClearPropVariantArray
FreePropVariantArray

 

 

Show: