I have an application which should run as a regular server application (with some very little user interface -- settings dialog, log window), but -- optionally -- as well as a system service on a 2003 Server (in this case teh user interface may not be visible).
As modifying the application into a system service seems to be much too difficult, I made a small system service application which launches my application on system startup. This way the program is already running when the CTRL+ALT+DEL logon screen appears, and is able to serve the network clients. The settings dialog and the log window aren't available in this mode, but that doesn't really matters (and I may solve that later).
The problem is that if I log on and then off from an account, the application is stopped by the system (even if it runs as a system owned application rather than a user owned one, and it was running before the user logged on).
My questions are:
1. Does this happen because my application has a main window, or because it isn't a regular system service (just a system owned application, started by a system service)?
2. Do I have any chance to solve this problem without transforming the application into a regular system service?
3. In case I will have to transform it into a system service: my application uses the message queuing system of the Windows (some incoming client messages are queued as Windows messages, sent by PostMessage to the handle of a window); will this work if it will become a system service? If so, what window handle will I have to send the message to?
Waiting for suggestions,