Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Former Member Absent Member.
Absent Member.
179 views

[archive] Calling .NET 2.0 Interfaces from Cobol

[Migrated content. Thread originally posted on 20 March 2009]

Hello,

I work for a company which uses AcuCobol to call a number of .NET 1.1 DLLs via Interfaces made accessible from the COM. The interfaces work great, but due to the growing age of .NET 1.1 I have started to look at moving these interfaces to .NET 2.0

Before I even started rewriting the interfaces, I decided to do some tests to verify that I could make calls to a .NET 2.0 DLL whose interface is exposed to the COM. I wrote a simple interface with one method which simply displays a MessageBox with a greeting. I compiled the DLL, registered it with the COM (using .NET 2.0's regasm), and then used AxDefGen to generate a .def file. I then wrote a simple Cobol program to create the interface and call the method.

When I do this, I receive the following error message. "Class is not licensed for use (error 80131107)" Nothing I have done has fixed the problem. Wondering what the issue might be, I wrote the exact same interface in .NET 1.1, compiled the DLL and used AxDefGen to create a .def file, and registered it with COM using .NET 1.1's regasm. I recompiled the Cobol program, and to my surprise it worked without any issues.

Is there some sort of limitation keeping me from calling .NET 2.0 DLLs? Am I doing something wrong in .NET 2.0 that is keeping the procedure from working? My experience with the COM has lead me to believe that it shouldn't matter what type of assembly I'm calling. Does anybody have any ideas?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.