OPC Studio User's Guide and Reference
VarType Class
Members 



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.ComInterop Namespace : VarType Class
Data type specifications used in COM. Contains .NET equivalents of COM VARTYPE.
Syntax
'Declaration
 
<CLSCompliantAttribute(True)>
<ComDefaultInterfaceAttribute(OpcLabs.BaseLib.ComInterop.ComTypes._VarType)>
<ComVisibleAttribute(True)>
<GuidAttribute("7235EA30-9362-42BC-913A-E1BB1AD850DC")>
<TypeConverterAttribute(OpcLabs.BaseLib.ComInterop.Implementation.VarTypeConverter)>
<ValueControlAttribute("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.80.82.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", 
   DefaultReadWrite=False, 
   Export=True, 
   PageId=10001)>
<SerializableAttribute()>
Public NotInheritable Class VarType 
   Inherits OpcLabs.BaseLib.Info
   Implements OpcLabs.BaseLib.ComInterop.ComTypes._VarType, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.INotifyPropertyChanging, System.ICloneable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable 
'Usage
 
Dim instance As VarType
[CLSCompliant(true)]
[ComDefaultInterface(OpcLabs.BaseLib.ComInterop.ComTypes._VarType)]
[ComVisible(true)]
[Guid("7235EA30-9362-42BC-913A-E1BB1AD850DC")]
[TypeConverter(OpcLabs.BaseLib.ComInterop.Implementation.VarTypeConverter)]
[ValueControl("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.80.82.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", 
   DefaultReadWrite=false, 
   Export=true, 
   PageId=10001)]
[Serializable()]
public sealed class VarType : OpcLabs.BaseLib.Info, OpcLabs.BaseLib.ComInterop.ComTypes._VarType, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.INotifyPropertyChanging, System.ICloneable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable  
[CLSCompliant(true)]
[ComDefaultInterface(OpcLabs.BaseLib.ComInterop.ComTypes._VarType)]
[ComVisible(true)]
[Guid("7235EA30-9362-42BC-913A-E1BB1AD850DC")]
[TypeConverter(OpcLabs.BaseLib.ComInterop.Implementation.VarTypeConverter)]
[ValueControl("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.80.82.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", 
   DefaultReadWrite=false, 
   Export=true, 
   PageId=10001)]
[Serializable()]
public ref class VarType sealed : public OpcLabs.BaseLib.Info, OpcLabs.BaseLib.ComInterop.ComTypes._VarType, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, System.ComponentModel.INotifyPropertyChanged, System.ComponentModel.INotifyPropertyChanging, System.ICloneable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable  
Remarks

Certain bitwise operations, such as ORing the VT_ARRAY with the element type, are allowed. Windows has some limitations as to which combinations can be made. Also, different types are permissible in different contexts.

The System.Runtime.InteropServices.VarEnum enumeration contains similar members, but is not well suited for uses other than described there. Do not confuse the two.

Inheritance Hierarchy

System.Object
   OpcLabs.BaseLib.Object2
      OpcLabs.BaseLib.Info
         OpcLabs.BaseLib.ComInterop.VarType

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also