Hi all,
In my code, I am trying to create a new process to run an installation program. This program installs and registers a number of files. I don't want to continue execution of the calling application until this new process has completed its work.
So far I have been using CreateProcess(...) and WaitForSingleObject(ProcessHandle, INFINITE).
My problem is that WaitForSingleObject never seems to return to the calling program. So - we sit in what seems to be an endless 'loop' and nothing happens. If I remove WaitForSingleObject, the installation program runs fine, but my calling program runs at the same time - I need to avoid doing this.
I think the problem may lie in the fact that the installation program calls another exe from within in it - perhaps my code is not sufficient to find out when they both end??
So - What is the best way to work out when my installation program has completed execution??
thanks in advance,
Em
In my code, I am trying to create a new process to run an installation program. This program installs and registers a number of files. I don't want to continue execution of the calling application until this new process has completed its work.
So far I have been using CreateProcess(...) and WaitForSingleObject(ProcessHandle, INFINITE).
My problem is that WaitForSingleObject never seems to return to the calling program. So - we sit in what seems to be an endless 'loop' and nothing happens. If I remove WaitForSingleObject, the installation program runs fine, but my calling program runs at the same time - I need to avoid doing this.
I think the problem may lie in the fact that the installation program calls another exe from within in it - perhaps my code is not sufficient to find out when they both end??
So - What is the best way to work out when my installation program has completed execution??
thanks in advance,
Em