VariantInit

This function initializes a variant.

At a Glance

Header file: Oleauto.h
Windows CE versions: 2.0 and later

Syntax

HRESULT VariantInit( VARIANTARG FAR * pvarg);

Parameters

pvarg

Pointer to the VARIANTARG that will be initialized.

Remarks

Passing into this function any invalid and, under some circumstances, NULL pointers will result in unexpected termination of the application.

The VariantInit function initializes the VARIANTARG by setting the vt member to VT_EMPTY. Unlike VariantClear, this function does not interpret the current contents of the VARIANTARG. Use VariantInit to initialize new local variables of type VARIANTARG (or VARIANT).

Example

for(i = 0; i < celt; ++i)
   VariantInit(&rgvar[i]);