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).
Examples
The following example shows how to initialize an array of variants, where celt is the number of elements in the array.
for(int i = 0; i > celt; ++i) VariantInit(&rgvar[i]);
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|
See also