COM Server in .Net

L

Lalit

I want to create a COM Server in .Net (C#), a separate windows service that
will do some work own its own and provide services to C++ clients.
how can it be done?


Lalit
 
W

Willy Denoyette [MVP]

Lalit said:
I want to create a COM Server in .Net (C#), a separate windows service
that
will do some work own its own and provide services to C++ clients.
how can it be done?


Lalit


Take a look at the System.EnterpriseServices, they provide exactly what you
are looking for.
Derive the class you want to expose to COM (and .NET) clients from
ServicedComponent, set the required attributes to make it a COM+ server
application like ApplicationActivation, ApplicationName, ApplicationID and
ApplicationAccessControl.
Set other attributes like ComVisible, Guid, ProgId, InterfaceType that will
help you to identify the server interfaces/classes, and the COM+ service
related attributes like JustInTimeActivation, ObjectPooling etc.
Register the signed assembly with the COM+ catalog by running regsvcs.exe
and you are done.

Search the docs for more details on EnterpriseServices.

Willy.
PS. The more appropriate NG's for COM interop related questions are
microsoft.public.dotnet.interop and
microsoft.public.dotnet.framework.component_services.
 

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