>>> DECLARE SHORT GetExitCodeProcess IN WIN32API AS GetExitCodeProc ; >>> INTEGER hProcess, ; >>> @INTEGER lpdwExitCode >>> LOCAL nRetunCode >>> nReturnCode = 0 >>> >>> IF GetExitCodeProc(tnProcessToCheck, @nReturnCode) && HERE HERE >>>>>
>> DECLARE SHORT GetExitCodeProcess IN WIN32API AS GetExitCodeProc ; >> INTEGER hProcess, ; >> INTEGER lpdwExitCode >> >> IF (GetExitCodeProc(tnProcessToCheck, nReturnCode) != 259) >>>>Also, for NT based system when you want to terminate a process, you must first open the process and set permission to terminate then you can terminate it.
Declare Long GetExitCodeProcess in Kernel32 ; Long hProcess, Long @nExitCode ll_Error = (GetExitCodeProcess(ln_hProcess, @ln_ExitCode) == 0) If !ll_Error and (ln_ExitCode != 259) *** Do something endifBtw, I have looked into your code. I don't think it will wait if Acrobat is already running. Have you try that ?