BYTEINSIGHT
GAPVelocity AI Studio helps you move from outdated tech stacks to the latest desktop, web, and cloud platforms—smarter, faster, and with less risk.
Choose a platform to see migration options:
Our comprehensive approach to application modernization, from assessment to production deployment.
Transformation Services
Not Sure Where to Start?
This is related to upgrading Groups of Projects, but in this case the ActiveX library is upgraded through Interop, which differs from a native upgrading. One of the differences is that properties with arguments ByRef are converted to methods with the prefixes “get_” and “set_”. This implies that the VB6 AI Migrator must convert this kind of properties to methods too when upgrading through Interop.
There is a consideration for this feature when upgrading to Visual Basic .NET. If these properties were converted to methods, there would not be a way to get a target code that can be compiled correctly. Writing the same implementing class from the beginning in the Visual Studio editor is not possible either, so this seems to be an issue with Interop upgrading in Visual Studio. The issue consists on the generation of that property. The Interop generation converts that property to a set property with a ByRef argument, but in Visual Basic .NET this is not allowed.
Library::AnInterface.cls Public Property Get p1() As String End Property Public Property Let p1(v As String) End Property Project::AClass.cls Implements Library.AnInterface Public Property Get AnInterface_p1() As String End Property Public Property Let AnInterface_p1(v As String) End Property
Implements Library.AnInterface Public Property p1() As String Implements InterfacesToInterop.AnInterface.p1 Get End Get Set(ByVal value As String) End Set End Property
internal class AClass : InterfacesToInterop.AnInterface{ public string get_p1() { return String.Empty; } public void set_p1(ref string v) { } }