About fixing OLE_HANDLE values
The following are example VB .NET errors:
- Error 1 Class 'clsAlgColorRamp' must implement 'ReadOnly Property Bitmap() As Integer' for interface 'ESRI.ArcGIS.SystemUI.ICommand'. Implementing property must have matching 'ReadOnly' or 'WriteOnly' specifiers.
- Error 2 Type 'ESRI.ArcGIS.esriSystem.OLE_HANDLE' is not defined.
The following is the cause of the VB .NET error:
- The wrong return data type is not translated correctly by the upgrade wizard for properties and functions that return an esriSystem.OLE_Handle. In VB .NET, it is System.Int32. Change the return data type to the correct data type.
The following is the original VB6 code:
[VB6]
Private Property Get ICommand_Bitmap() As esriSystem.OLE_HANDLE
End Property
The following is the auto-translated code to VB .NET:
[VB.NET]
'Initial auto-translated VB .NET conversion.
Private ReadOnly Property ICommand_Bitmap() As ESRI.ArcGIS.esriSystem.OLE_HANDLE Implements ESRI.ArcGIS.SystemUI.ICommand.Bitmap
Get
End Get
End Property
[VB.NET]
'Correct VB .NET translation.
Private ReadOnly Property ICommand_Bitmap() As System.Int32 Implements ESRI.ArcGIS.SystemUI.ICommand.Bitmap
Get
End Get
End Property
See Also:
Migrating from VB6 to VB.NETGeneral steps for migrating from VB6 to VB.NET
Development licensing | Deployment licensing |
---|---|
ArcView | ArcView |
ArcEditor | ArcEditor |
ArcInfo | ArcInfo |
Engine Developer Kit | Engine Runtime |