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.