Windows Service - GUI application
-
Hi, I try to develop C# service application. One of the component used interacts to a GUI windows application. It's a small application but still has GUI. Clearly, to run my C# application as a service, unless this external exe can run also in service mode, it does not work. Is it impossible to install a GUI windows application to windows service? or is there a way to wrap it as a service component? Thanks for your advice. Best, Ken
-
Hi, I try to develop C# service application. One of the component used interacts to a GUI windows application. It's a small application but still has GUI. Clearly, to run my C# application as a service, unless this external exe can run also in service mode, it does not work. Is it impossible to install a GUI windows application to windows service? or is there a way to wrap it as a service component? Thanks for your advice. Best, Ken
In the C world, this is a good reference: Interacting with the User in a Service. For .NET (in Introduction to Windows Service Applications) MSDN says, "The Windows Service classes supported by the .NET Framework do not support interaction with interactive stations, that is, the logged-on user. The .NET Framework also does not include classes that represent stations and desktops. If your Windows Service must interact with other stations, you will need to access the unmanaged Windows API." So the above link (for the C) world should get you started.
Ian Mariano - http://www.ian-space.com/
"We are all wave equations in the information matrix of the universe" - me -
Hi, I try to develop C# service application. One of the component used interacts to a GUI windows application. It's a small application but still has GUI. Clearly, to run my C# application as a service, unless this external exe can run also in service mode, it does not work. Is it impossible to install a GUI windows application to windows service? or is there a way to wrap it as a service component? Thanks for your advice. Best, Ken
You could also write your external GUI EXE to take advantage of remoting to access the service (via remoting services exposed by the service.) See Accessing Objects in Other Application Domains Using .NET Remoting.
Ian Mariano - http://www.ian-space.com/
"We are all wave equations in the information matrix of the universe" - me