Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

VariantInit function

Initializes a variant.

Syntax


void VariantInit(
  _Out_ VARIANTARG *pvarg
);

Parameters

pvarg [out]

The variant to initialize.

Return value

This function does not return a value.

Remarks

The VariantInit function initializes the VARIANTARG by setting the vt field 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).

Windows Phone 8.1: This API is supported.

Examples


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

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

See also

Variant Manipulation Functions

 

 

Community Additions

ADD
Show:
© 2015 Microsoft