So you confirm that some programs like Acrobat Reader have a standard behaviuor when it close itself ?
>Probably the handle passed in your code to WaitForSingleObject is invalid.
>
>There is VFP code sample on my web site (membership required) that uses CreateProcess and WaitForSingleObject API calls exactly for this purpose.
>
>
Starting external program from VFP and waiting for its termination>
http://www.news2news.com/vfp/?example=377
bye, Emanuele!
In the beginning the Universe was created.
This has made a lot of people very angry and been widely regarded as a bad move.