So the title is quite self explanatory.
I have this one service written in C++ that creates a tray icon with CreateProcessAsUser and everything seems to work fine.
The problem comes when stopping the service, which I also want to stop the tray icon application but this has to be done gently, as this application may recieve some data that has to save to a file before exiting.
If useful, the wxWidgets API may be used, but all the process creation is now made with the Windows API, even the tray icon itself is made with wxWiidgets in mind, as well as the service.
Any advice is welcomed!