Cant generate wrappers in VA6.0.2 for .NET 2.0 DLLs.

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

Cant generate wrappers in VA6.0.2 for .NET 2.0 DLLs.

Postby khurdp » Thu Nov 08, 2007 9:05 am

Greetings,
During late 2005, we established a DLL written in C# (Visual Studio 2003, .NET 1.1) to use as an integration point with our existing application written in Visualage 5.5. This integration was performed by exposing a set of COM interfaces in the .NET DLL. This component allowed our Visualage application to perform direct COM access as well as utilization of a COM event sink. At that time, we easily performed this integration by using the OLE Class wrapper generator feature of Visualage to generate wrapper classes for the COM exposed methods written in C#. The only precondition was that the .NET DLL was properly registered on the machine using the .NET Framework tool regasm with the /codebase switch.

Currently, we are updating the .NET DLL to utilize Visual Studio 2005, .NET 2.0. In addition, we are also enhancing the exposed capability in the DLL. This requires that we again use the OLE Class generation feature of Visualage, this time from VA6.0.2. However, with many variations of the .NET DLL COM exposure, we continue to have problems with its visibility in the OLE Class wrapper generator - keep getting the 'The selected object does not support OLE automation' error. Has anyone successfully performed OLE class wrapper generation using (correction: VA602 for ) a .NET 2.0 COM DLL? If so, was there anything specific that you found that you needed to do?

Thank you,
Fred & Prasad
Last edited by khurdp on Sat Nov 10, 2007 4:32 pm, edited 2 times in total.
khurdp
 
Posts: 5
Joined: Mon Oct 29, 2007 7:06 am

Re: Cant generate wrappers in VA6.0.2 for .NET 2.0 DLLs.

Postby marten » Sat Nov 10, 2007 4:31 am

khurdp wrote:Has anyone successfully performed OLE class wrapper generation using a .NET 2.0 COM DLL?


After reading your article I wanted to know, how this worked and had no problems to generate wrapper code (actually using VA 7.5.2) for the following simple class (using VS2005):

Code: Select all
namespace COMTestSystem
{
    public interface IMFTestSystem
    {
        String Name { get; set;}
        double DoAction(double value1, double value2);
    }

    public class MFTestSystem :IMFTestSystem
    {
        String name = null;

        public MFTestSystem()
        {
        }

        public String Name {   
            get { return name ; }
            set { name = value; }
        }

        public double DoAction(double value1, double value2)
        {
            return (value1 + value2);
        }
    }
}


The result were the corrensponding Smalltalk methods for property accessing and method .... therefore I see not problems here ...
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Postby khurdp » Sat Nov 10, 2007 4:24 pm

Dankeschoen Marten.

I too was able to generate the wrappers using VA751 but I will not be able to use VA751 or greater until 2008Q3 because of budget reasons so.... the posting to be able to generate the wrappers using VA602 for .Net v2.0 dlls.

thanks,
Prasad
khurdp
 
Posts: 5
Joined: Mon Oct 29, 2007 7:06 am

Postby marten » Sat Nov 10, 2007 11:28 pm

khurdp wrote:Dankeschoen Marten.

I too was able to generate the wrappers using VA751 but I will not be able to use VA751 or greater until 2008Q3 because of budget reasons so.... the posting to be able to generate the wrappers using VA602 for .Net v2.0 dlls.

thanks,
Prasad


Then create it with the 7.5.1 version and import the created source code into your 6.0.2 image - according to the configuration maps, the OLE code has not changed that much from 6.0.2 to 7.5.1.

Did you consider to switch to 6.0.4 code from IBM ?

Marten
marten
[|]
 
Posts: 641
Joined: Sat Oct 14, 2006 7:10 am
Location: Hamburg - Germany

Postby khurdp » Fri Nov 23, 2007 11:54 am

Thanks Marten for that suggestion but I had tried that earlier. It didn't work either. Anyways we tried something else and have succeeded.

We took the .net v1.1 dll, registered it. Generated the wrappers, unregesitered the v1.1, registered the v2.0 and were still not able to use the v2.0 dll. The class names, guid etc were all the same. As we were testing to see if it works, it occured to Fred that they (the team Fred is in) had a constraint to permit only v1.1 dlls in the abt.exe.config file. Below is the line that was stopping us from using the v1.1 wrappers for v2.0. Fred removed that line from the config file and we could use the v2.0 dll from VA6.0.2
<startup>
<supportedRuntime version="v1.1.4322" />
</startup>

Thank you,
Prasad
khurdp
 
Posts: 5
Joined: Mon Oct 29, 2007 7:06 am


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest