Howdy, Stranger!

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

Categories

ShellExecute

sziszi81sziszi81 Member Posts: 80
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

  • zibadianzibadian Member Posts: 6,349
    : 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.
  • sziszi81sziszi81 Member Posts: 80
    : : 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.