Is there any way to find out details about the thread or process that started up my application? I have a program that can be auto started by a 'Recognizer' object or directly through the application launcher, by the user.
The problem stems around the fact that if the 'Recognizer' starts my program it doesn't work properly after a reboot, probably because some of the services/resources that it requires are not immediately available when it requests them during the boot process. However all goes well if I place a timer in the 'Recognizer' of about 20 seconds. However when I do this my program is starts in the foreground and I need it to start in the background. I've tried passing the enumerator 'EApaCommandBackground' to the 'SetCommandL' method of my 'CApaCommandLine' object, but this results in my program running in an early sleep state, which is useless. Any suggestions welcome. Thanks in advance.
The solution that I've implemented now is to simply force my application to the background as soon as it starts. If has been started it can be brought to the foreground by just selecting its icon from the application launcher. If it hasn't been started the user will have to start it, then open it to see it running in the foreground. It's not a perfect solution but it will have to do for now. Good luck kyomarja!