Description

The name or ID number of a type.

Return Type

A Variant value.  

The numeric mcobjTypeEnum ID or the type name of the type specified in the argument varNameOrID. The name will be returned in a “Namespace::Typename” format if the namespace of the type is not the same as the default Namespace property, otherwise just “Typename” is returned.

Syntax

object.TypeNameOrID (varNameOrID)

The TypeNameOrID Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McObjects.
varNameOrIDRequired. A Variant value.

The Typename (VT_BSTR) or ID (VT_I4) of a McObject Type.

Remarks

Given the Typename or ID of an McObjects Type, the method returns the corresponding ID or Typename, respectively. The Type ID is either one of the predefined mcobjTypeEnum values or the value returned by a call to the RegisterType or RegisterInterfaceClassFactory methods.

If the name passed in cannot be found, then mcobjTypeUNKNOWN (zero) is returned as the type code. If an unknown type ID is passed in, “ILLEGAL TYPE” is returned as the name, while mcobjTypeUNKNOWN results in “UNDEFINED TYPE”.

If the varNameOrID is given as a name, that type name must be within the scope of the current default Namespace, unless the actual namespace is supplied via the “::” syntax.