ShellExecute

Hey guys,

i wonder if anyone could help me with keeping track of the application i run with ShellExecute? I actually want to know if it's still running or finished.

I launch ARJ.EXE for a several times and a progress bar should show what percetage is finished, but currently the progressbar jumps up to 100% and the compression program runs in the background even after exiting from my application. I want to freeze my application until the compressions last.
How can i do that?

Any help is appreciated.
Sziszi

Comments

  • : Hey guys,
    :
    : i wonder if anyone could help me with keeping track of the application i run with ShellExecute? I actually want to know if it's still running or finished.
    :
    : I launch ARJ.EXE for a several times and a progress bar should show what percetage is finished, but currently the progressbar jumps up to 100% and the compression program runs in the background even after exiting from my application. I want to freeze my application until the compressions last.
    : How can i do that?
    :
    : Any help is appreciated.
    : Sziszi
    :
    You cannot, but there is an alternative: CreateProcess(). It does the same thing, but provides the handle to the process. This handle can be used for the GetExitCodeProces() to see wether or not the process is still active.
  • : : Hey guys,
    : :
    : : i wonder if anyone could help me with keeping track of the application i run with ShellExecute? I actually want to know if it's still running or finished.
    : :
    : : I launch ARJ.EXE for a several times and a progress bar should show what percetage is finished, but currently the progressbar jumps up to 100% and the compression program runs in the background even after exiting from my application. I want to freeze my application until the compressions last.
    : : How can i do that?
    : :
    : : Any help is appreciated.
    : : Sziszi
    : :
    : You cannot, but there is an alternative: CreateProcess(). It does the same thing, but provides the handle to the process. This handle can be used for the GetExitCodeProces() to see wether or not the process is still active.
    :


    Thanks for the help zibadian. In the meantime i solved the problem with the FindWindow() function. By the way...ShellExectue also returns a positive number which is the handle of the process...if it returns a negative number that means error.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories