Share via


COMVariant.uLong Method

Definition

Overloads

uLong(Int32)
uLong()

Gets or sets the value of a COMVariant object of the VT_UI4 (unsigned long) data type.

uLong(Int32)

public:
 virtual int uLong(int _newValue);
public virtual int uLong (int _newValue);
abstract member uLong : int -> int
override this.uLong : int -> int
Public Overridable Function uLong (_newValue As Integer) As Integer

Parameters

_newValue
Int32

The new value; optional.

Returns

Applies to

uLong()

Gets or sets the value of a COMVariant object of the VT_UI4 (unsigned long) data type.

public:
 virtual int uLong();
public virtual int uLong ();
abstract member uLong : unit -> int
override this.uLong : unit -> int
Public Overridable Function uLong () As Integer

Returns

The current value.

Remarks

If you pass in a value that has a different data type than the object, the data type of the object will be changed to match the data type of the value. The COMVariantType::VT_UI4 data type is also used for the uInt data type.

The following example creates a new COMVariant object of type VT_UI4 and sets the value to 123456.

{ 
    COMVariant var = new COMVariant( 
        COMVariantInOut::IN_OUT,  
        COMVariantType::VT_UI4); 
    // set value of the object 
    var.uLong(123456); 
}

Applies to