Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: How to Change Existing Program to Make it COM

$
0
0

Hi Chris

In our project earlier we were using a unmanaged DLL that was consumed by C++. Now we are migrating from C++ to .NET. So the same DLL can not be consumed by .NET.

The problem statement:-

The COBOL program "Prog1" inside the DLL is having 4 Entry points.

As read from some of the threads we are trying to create a COBOL COM wrapper Class from File -> New->CLASS->COM Component.

This will create a new class in a new Net Express project. then We tried to create 4 method using Class wizard in this Class for all entry points.

1. Like Method1 for Entry1

2. Method2 for Entry2.

Now we are not able to understand how to make a call to existing (Prog1) COBOL program for an entry points in the Method.

We also tried the below option:

Method 1()

          :declare in local storage of method 1

                   77 default-entry-point  procedure-pointer.

:Code in Mehtod

       set Default-Entry-point to entry "Prog1".  (in an method1)

                 and then call the Entry point.

                Call "Entry1" using

After this we compiled and build the Code and an DLL is created.

That DLL is registered using REGSVR32 and TILBIMP is doen for the same at .NET side.

Now when .NET tried to call MEthod1 after creating object of the Net Express Class.

We are getting an error 173 Called program not found in drive/directory.

Let us know where we are making mistake.

Thanks

Charan


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>