Description

The VARTYPE of the Value property.

Property type

An Unsigned Integer object.  

Syntax

object.ValueType

The ValueType Property syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McObject.

Remarks

This routine allows testing for the Variant type of the Value property without actually having to go to the expense of converting and copying the data into the Value property Variant. You might especially wish to do this if you will be accessing the data via the low-level direct memory access methods such as GetDataPointer.

The return value will be VT_DISPATCH for any NTI operator. It will be something like VT_I4 or VT_R8 for data type objects (ones with the mcobjTypeFlagData OR'ed into their Type property). The return value is the Variant VARTYPE of the Value property or VT_ERROR for an Alias without a Shadow, if there is no corresponding Variant type.

The Value of a scalar mcobjTypeBOOLEAN without the mcobjUserFlagAlwaysVector UserFlag set will be exposed as a VT_BOOL, but any vector of mcobjTypeBOOLEAN will be exposed as VT_I4. However, this ValueType property for mcobjTypeBOOLEAN is always reported as VT_I4.

The ValueType of a mcobjTypeVARIANT McObject will be VT_VARIANT. In this case, you must access the Value property and examine the returned Variant to see what the actual stored data type is.