Geoff,

> If you know the process handle you can execute the following call:
>
> WaitForSingleObject(hProcess,0)
> which will return immediately - you can also pass INFINITE which will wait
> (and stop your program) until the process terminates.
>
> Your example would then look something like:
> while WaitForSingleObject(hProcess,0) <> WAIT_OBJECT_0 do
>  Application.ProcessMessages;

If you use ShellExecuteEx, you can also get the handle via a structure that
you pass in.

Do remember to close your handles when you are done with them, if you use
CreateProcess.

Hope this helps.
------------------------------------------------------
Dennis Chuah, BE (Hons)  [mailto:[EMAIL PROTECTED]]
Manager, Product Development
Contec Data Systems Ltd. [http://www.contecds.com]
tel: +64-3-3580060-ext775  fax: +64-3-3588045




---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to