COMVariant::createFromInt64 Method

Creates a new COMVariant object and initializes it with an int64 value (longLong or uLongLong) in one operation.

Syntax

client server public static COMVariant createFromInt64(int64 value, [COMVariantInOut inOutFlag])

Run On

Called

Parameters

  • value
    Type: int64
    The int64 value used to initialize the object.
  • inOutFlag
    Type: COMVariantInOut Enumeration
    A flag that determines whether the object can be used to pass data to a COM method or COM property, to receive data, or both. This parameter is optional.
    Possible values are:

Return Value

Type: COMVariant Class
The new COMVariant object.

Remarks

The COMVariant object that is created by this method has the data type VT_I8 (int64).

You can change the data type of an existing COMVariant object to VT_I8 by using the variantType method or by passing in an int64 value by using the longLong or uLongLong property method.

Examples

The following example creates a COMVariant object of the VT_I8 variant data type (integer), and sets the value to 123456.

{ 
    COMVariant var; 
  
    var = COMVariant::createFromInt64(123456); 
}

See Also

COMVariant Class

COMVariant.longLong Method

COMVariant.uLongLong Method

COMVariant.new Method

COMVariant.variantType Method