- INDEX VB TO NET
- KNOWLEDGE BASE
- EWI-TODO
- TODO #1066
TODO #1066
2% is defined by a CreateObject method, which class name is not registered.
Description
This Issue appears when an object is instantiated with CreateObject, and by late binding they properties are called, but the VBUC is not able to resolve the referenced DLL.
Recommendations
Register any required dll with regsrv32 or installing the required product.
Sample VB6
PublicSub CreateObjectExample()
Dim PluginObj
PluginObj = CreateObject("PluginNamespace.Plugin")
PluginObj.Property = 0
PluginObj.Func("A")
PluginObj.Action(1)
EndSub
Target VB.NET
PublicSub CreateObjectExample()
Dim PluginNamespace AsObject
Dim PluginObj AsObject = New PluginNamespace.Plugin
'UPGRADE_TODO: (1066) PluginObj is defined by a CreateObject method, which class name is not registered.
PluginObj.Property = 0
'UPGRADE_TODO: (1066) PluginObj is defined by a CreateObject method, which class name is not registered.
PluginObj.Func("A")
'UPGRADE_TODO: (1066) PluginObj is defined by a CreateObject method, which class name is not registered.
PluginObj.Action(1)
EndSub
Target C#
publicvoid CreateObjectExample()
{
object PluginNamespace = null;
object PluginObj = new PluginNamespace.Plugin();
//UPGRADE_TODO: (1066) PluginObj is defined by a CreateObject method, which class name is not registered.
PluginObj.Property = 0;
//UPGRADE_TODO: (1066) PluginObj is defined by a CreateObject method, which class name is not registered.
PluginObj.Func("A");
//UPGRADE_TODO: (1066) PluginObj is defined by a CreateObject method, which class name is not registered.
PluginObj.Action(1);
}