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 Charan,

Adding the OOCTRL directive to a program does not automatically make it a COM server module. OOCTRL(+P) is required in both a COM Server and COM client in order to control the parameter passing required by COM.  In Net Express there was a wizard available which would automate the process of creating a COM module application that contained required class entries, a trigger program to register the class, type libraries and .reg files. This would create a COM server for your native COBOL programs.

In Visual COBOL the process is different and actually simpler. If you create your application as a managed .NET Class library assembly and set the option for use with COM Interop, it will automatically create a COM interface for all public methods in your class so that the managed .dll can be called from a COM client. Of course if you move you modules into managed code then there probably is no need to create it as COM as it could then be called directly from any .NET language.

Can you please clarify, how these existing modules were being compiled for COM previously and how are they being used in your application? Were you previously using Net Express to create these modules?

What is the current requirement for these modules, to be called by C# or some other .NET language?

Thanks


Viewing all articles
Browse latest Browse all 4356

Trending Articles



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