Jeroen Mostert
7/11/2008 2:25:00 PM
Patrick Sona wrote:
> I have written a small little windows-service. I can start and stop this
> service in the service-snapin. So far all pretty nice!
> But i need to controll this service. It is possible to send this service
> an object (such as a string) an receive object (also a string, or
> another object)?
>
You can use .NET remoting or WCF for this purpose, if your service and the
applications that control it are managed. This is by far the easiest
approach. Alternate approaches are one of the many unmanaged communication
mechanisms, mentioned by Eugene Mayevski.
Be careful in designing the interface to your service. Services usually run
at elevated privileges and pose a security risk if unprivileged clients can
control them in unexpected ways.
--
J.