A
Alex
Hello everyone,
I'm currently in the process of converting a huge project from VS2003 to
VS2008. I'm having a very specific problem to which I cannot find a
solution.
Take a quick look at the following code:
(assembly name is ClassLibrary1)
Public Class Class1
Public Overridable Sub Init(ByVal kernel As MSComCtl2.MonthView)
End Sub
Public Overridable Function GetKernel() As MSComCtl2.MonthView
Return Nothing
End Function
End Class
(assembly name is ClassLibrary2)
Public Class Class2
Inherits ClassLibrary1.Class1
Public Overrides Sub Init(ByVal kernel As MSComCtl2.MonthView)
End Sub
Public Overrides Function GetKernel() As MSComCtl2.MonthView
Return Nothing
End Function
End Class
I'm using MSComCtl2.MonthView as an example. In the actual software, this is
a plain vanilla C/C++ COM object that is part of the project. Apparently,
this happens with any COM object.
The particularity of the problem is that both of these classes are in
different assemblies. If I try to do it within the same assembly, I get no
problem. As separate assemblies, I'm being told the Init sub isn't matching
a function of the base and that the return types on GetKernel are different.
Obviously, they aren't but VB apparently thinks they are.
I could prolly just change the name for Object and avoid these annoying
errors, but I'd like to understand what changed from VS2003 to VS2008 that
made this code go from working to not working.
Thanks for your help,
Alex.
I'm currently in the process of converting a huge project from VS2003 to
VS2008. I'm having a very specific problem to which I cannot find a
solution.
Take a quick look at the following code:
(assembly name is ClassLibrary1)
Public Class Class1
Public Overridable Sub Init(ByVal kernel As MSComCtl2.MonthView)
End Sub
Public Overridable Function GetKernel() As MSComCtl2.MonthView
Return Nothing
End Function
End Class
(assembly name is ClassLibrary2)
Public Class Class2
Inherits ClassLibrary1.Class1
Public Overrides Sub Init(ByVal kernel As MSComCtl2.MonthView)
End Sub
Public Overrides Function GetKernel() As MSComCtl2.MonthView
Return Nothing
End Function
End Class
I'm using MSComCtl2.MonthView as an example. In the actual software, this is
a plain vanilla C/C++ COM object that is part of the project. Apparently,
this happens with any COM object.
The particularity of the problem is that both of these classes are in
different assemblies. If I try to do it within the same assembly, I get no
problem. As separate assemblies, I'm being told the Init sub isn't matching
a function of the base and that the return types on GetKernel are different.
Obviously, they aren't but VB apparently thinks they are.
I could prolly just change the name for Object and avoid these annoying
errors, but I'd like to understand what changed from VS2003 to VS2008 that
made this code go from working to not working.
Thanks for your help,
Alex.