How to make a "Out of Process Component" (ActiveX Exe Serve) in Do

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all,

in VB6 we were able to create ActiveX-DLL's (In Process Components) and
ActiveX-Exe's (Out of Process Components).

We habe build up an application that exists of an main module (Standard Exe)
that calls and controls other modules (ActiveX-Exe).

We decided for ActiveX-Exe because they run in different processes. That
means if one module shuts down, the others are still alive. Second reasons
was that modal dialogs are just modal for one module. So the others are not
blocked.

Now we want to migrate to .NET step by step. That means module by module.
Now we have the problem, that we don't know how to implement a Out of
Process component in DotNet.

At the moment all new DotNet modules run in the same process as the calling
application. So of course we also lost these modal dialogs per module.

Just for a better understanding. For example Excel, Word or Powerpoint are
also ActiveX-Exe or Out of Process Components. You can start, display and
control them via their Object Model. How can create such ActiveX Exe's with
DotNet.

Thanks in advance.

Best regards,
U.Henne
 
The office app's use OLE. The framework, as of now, does not have support for many (if not all) of the OLE interfaces. The
WebBrowser control (using the ActiveX host wrapper) allows for a .NET program to embed OLE objects into WinForms. Think of it as a
complex OLE container implementation that works in .NET.

If you have ActiveX components that are reusable, then you can drop a WebBrowser control (COM tab in add references, then Internet
Controls Library. (I think it's called shvwdoc.dll)), and embed your ActiveX control in that. Communication between your app and
the AX component can be done through the HTML Object Library as in IE.

As soon as you need out-of-process communication in .NET, you must use the Remoting framework. I suggest making your ActiveX
components into UserControls and running multiple instances of your Forms in different processes (or AppDomains). You'll have to
remote the objects to communicate cross-domain/process.
 
How can create such ActiveX Exe's with DotNet.

You cannot - that's all there is to say.

What we ended up doing is create an ActiveX Shell EXE, that basically
just loads and executes a .NET DLL assembly (containing code in a COM
object).

Marc
 
Back
Top