4

I would like to implement a component in .NET, and consume it in COM-aware clients via COM interop.

I would like this component to be a singleton across all processes that use it.

This thread suggests using WCF/remoting but doesn't go into much detail. Is there a good reference/example?

Community
  • 1
  • 1
Danra
  • 9,546
  • 5
  • 59
  • 117

2 Answers2

4

Remoting is a relic of the past and has been replaced by WCF.

You need to implement a WCF service and set the instancing mode to Single.

I suggest you expose it as a Named Pipe service and host it on Windows service. A word of caution, however, if it starts giving you problems with Named Pipe hardening, you might have to use TCP binding.

Aliostad
  • 80,612
  • 21
  • 160
  • 208
0

Why not create a windows service that the COM component communicates with? The COM is the interface that all your users work with while the service contains the actual logic.

jgauffin
  • 99,844
  • 45
  • 235
  • 372