Controlling a C# Application from a VB6 app

  • Thread starter Thread starter cybertof
  • Start date Start date
C

cybertof

Hello,

Actually, I have a main VB6 application which launches an external c#
application through a shell command.

Each time the C# application is launched, the framework is "loaded" so
it takes time to load and run.

What would be the best solution ?

- Is there a way to have a C# application always loaded and waiting for
a request of a VB6 application on the same machine ?
- Is there a way to make a C# application OLE Automatted ?
- Is there a way to make a C# application an Active X ?
(but still beeing able to be launched independently)

The main point would be to keep the C# app always loaded so consecutive
calls to this applications would be immediate.


Any suggestion would be appreciated.

Regards,
Kristo.
 
Kristo,

I wouldn't make it a separate app, to be honest. Rather, I would create
components in .NET that will perform the functions that you need, and then
export them to COM. Then, in the VB project, you would just reference the
COM exports, and then make the calls normally.

For more information on exporting types to COM, check out the section of
the .NET framework developers guide titled "Exposing .NET Framework
Components to COM", located at (watch for line wrap):

http://msdn.microsoft.com/library/d.../cpconexposingnetframeworkcomponentstocom.asp

Hope this helps.
 
Back
Top