[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?