Is there an equivalent to out-of-process COM EXE in .NET?

One of the nice things about COM / ActiveX is that the EXE is outside the process. You may have an EXE that exposes methods and properties in a form that can be used by other processes, including VBScript and JScript. At the same time, an EXE may have its own functionality, whether or not related to what is displayed in its type library.

What is the .NET equivalent?

I have an existing VB6 project that is an interpreter of a scripting language (using MSScript) and a resource of various tool functions for other scripting languages. It has been suggested that I am trying to convert it to .NET.

Will this work, or will I finish breaking one element into two?

+7
design com activex
source share
3 answers

Corporate services let you do just that. You can run the COM component as:

  • DLLHost process
  • Service
  • Inproc library (this is in the same process as your other code)

There are many examples on the Internet about this. What does it mean:

  • Decorate your classes that you need to expose on COM with interfaces
  • The components you want to host must be unloaded from the ServicedComponent
  • Decorate your interfaces with GuidAttribute (use unique Guid)
  • Decorate interfaces and classes that are exposed to COM with the ComVisible attribute (true)

Hope this helps.

+4
source share

Compliance with .NET .NET Remoting for .NET 2.0 and WCF for version 3.0+. If you need to exchange data with COM objects, you must create an object open to COM. There are many textbooks for this.

+3
source share

There are several options for this; the most obvious is the serviced components ; this allows you to manage managed code in COM + to run it in a separate process, but you need a GAC ​​/ COM call, etc.

+1
source share

All Articles