Remote COM server in C#?

  • Thread starter Thread starter Igor R.
  • Start date Start date
I

Igor R.

Is the subj feasible?

More detailed question: I've got a WCF service, which must be accessed
from a remote application written in c++. I thought it would be much
simple, if all the objects in the service would be accessible as COM
objects as well.

Thanks.
 
Igor said:
Is the subj feasible?

More detailed question: I've got a WCF service, which must be accessed
from a remote application written in c++. I thought it would be much
simple, if all the objects in the service would be accessible as COM
objects as well.

Yes, you can write a COM server in C#. You'll need to import the COM
types (see tlbimp.exe) and register your assembly (see regasm.exe). See
".NET COM interop" for more details.

Pete
 
I had the same problem:

Wrote a local .NET COM Server that communicates with the WCF Server by the
common .NET build in features.
C++ apps only communicate with that COM Server by its public interface.

As easy as that.

BR,
Kevin
 
Thanks for your replies.
I know how to make an inproc (dll) COM server in C#. The problem is
that when I try to apply regasm to an exe, it says that no types were
registered.
 
Why do you need an application? Is a dll c# COM server not sufficient?

That COM Server is nothing more than a COM wrapper for the WCF server.

Kevin
 
Why do you need an application? Is a dll c# COM server not sufficient?
That COM Server is nothing more than a COM wrapper for the WCF server.

You mean that I have make another DLL that would expose all the
interfaces of the WCF server, and implement them by forwadring to the
WCF server? Well, for lack of any other option, that's what I'm doing
now, but it doubles the maintenance cost.
 
Igor said:
You mean that I have make another DLL that would expose all the
interfaces of the WCF server, and implement them by forwadring to the
WCF server? Well, for lack of any other option, that's what I'm doing
now, but it doubles the maintenance cost.

I don't really think that's necessary. You should look more closely at
why regasm.exe isn't finding anything to export. Maybe you've just
forgotten to enable COM visibility in the project settings, or something
else simple like that?

Pete
 
Back
Top