How To Create "Out Of Process" Components

H

Henne

Hello,

in VB6 we werr able to make ActiveX-DLL's (In Process Components) and
ActiveX-Exe (Out Of Process Components).

Out Application is build of one main application that starts other
modules. These modules are ActiveX-Exe's. The main application
controls the modules via ActiveX.

We decided to use ActiveX-Exe because we want to run the modules in
separate processes. So when one module crashes the others are still
available.

Now we want to migrate to .NET.

How can I create a "Out of Process" component with .NET.

When I call a method of a .NET class library, these component always
runs in the same process as the calling application.

Any ideas?

Thanks in advance.

Best regards,

Ulrich Henne
 
B

Brian Gideon

Ulrich,

You can use .NET Remoting to allow two processes to talk to each other.
This is not the same thing as out-of-process components in VB6, but it
should provide you with the functionality you desire. Also, take a
look at application domains (the AppDomain class) for more isolation
options.

Brian
 
H

Henne

Hello Brian,

thanks for your reply.

For me, remoting always was a call on a business component that will
do something, return a value and then is gone.

What I am looking for is a component with a windows front end or let's
say a windows application with an external control inteface. This
application should stay alive as long the calling application has a
link to it.

For me it is not clear if this will still be the right way.
If yes, should I write my own hosting application or use IIS?

Thanks in advance.

Best regards

Ulrich
 
B

Brian Gideon

Ulrich,

My comments are inline.

Brian
Hello Brian,

thanks for your reply.

For me, remoting always was a call on a business component that will
do something, return a value and then is gone.

That's the behavior you get with a server activated object (SAO) that
is setup with the WellKnownObjectMode.SingleCall option. The
WellKnownObjectMode.Singleton option will allow clients to participate
in the lifetime of the object. I'm strictly speaking about the
lifetime of the remoted object here. The lifetime of the host process
is a different issue.
What I am looking for is a component with a windows front end or
let's say a windows application with an external control inteface.
This application should stay alive as long the calling application
has a link to it.

This is definitely doable with .NET Remoting.
For me it is not clear if this will still be the right way.
If yes, should I write my own hosting application or use IIS?

If you use IIS then you will need IIS installed on every machine your
remotable application runs on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top