calling registered COM objects from managed code

Hi, I'm new to Visual Cobol (I have Version 2.1 Upgrade with Visual Studio 2012 running in Windows 8).

In Net Express I used an OO program to call registered COM objects.

Using VC (Form Designer) I have made references to these objects: They are described as Interop.ObjectName, Type ActiveX.

But, I haven't found any explanation or instructions on how to code  these objects and call their entry points.

I'd appreciate some help on the subject.

  • Verified Answer

    In a Visual COBOL native program you can use the same OO client classes to call COM as you did in Net Express.

    From a managed code program, after you add a reference to these COM servers you would just create a new instance of the server and call its methods like any other OO class.

    Intellisense should show you the available methods and the expected parameters.

    What ActiveX/COM servers are these?

    An example of a managed COBOL application calling the Excel COM Server can be found here:

    Visual Cobol PE install error.rar
  • Verified Answer

    Thank's Chris,

    the COM servers are Customer made. 1 (SAP interface) in VB, the other (Elreco number plate recognition system) in C.

    Your answer pushed me in the right direction after I had stumbled into an unnecessary Wrapper to call my old dll.