Share via


VariantInit

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function initializes a variant.

Syntax

VOID VariantInit( 
  VARIANTARG FAR* pvarg 
); 

Parameters

  • pvarg
    [out] Pointer to the VARIANTARG that will be initialized.

Remarks

Passing invalid (and under some circumstances NULL) pointers to this function causes an unexpected termination of the application.

The VariantInit function initializes the VARIANTARG by setting the vt member to VT_EMPTY.

Unlike VariantClear, this functiondoes not interpret the current contents of the VARIANTARG.

Use VariantInit to initialize new local variables of type VARIANTARG (or VARIANT).

Requirements

Header oleauto.h
Library oleaut32.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

Automation Functions
VARIANT and VARIANTARG
VariantClear