Dear Fred,
Is it possible to make an "Exit-Code"-Output for the RunProgram command.
I think its really important.
I needed that very often.
Also, this function exists in many other languages.
best regards
Hroudtwolf
[Implemented] "Exit-Code"-Output for Runprogram
- Hroudtwolf
- Addict
- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact:
I understood Hroudtwolf's problem differently; not the exit code of his program is meant, but he exit code of an external app, invoked from his program with the RunProgram parameter.Bonne_den_kule wrote:End exitcode
Just in case a replacement, I am now using
Code: Select all
ei.SHELLEXECUTEINFO
ei\cbSize = SizeOf(SHELLEXECUTEINFO)
ei\fMask = #SEE_MASK_FLAG_DDEWAIT | #SEE_MASK_NOCLOSEPROCESS
ei\nShow = #SW_HID
ei\lpVerb = @"open"
ei\lpFile = @Command.s
ei\lpParameters = @Parameters.s
ei\lpDirectory = @Path.s
Result = ShellExecuteEx_(@ei)
If Result
For i = 1 To 300
´ Delay(1000) ;check for 300*1000ms if ShellExecute is done
If GetExitCodeProcess_(ei\hprocess, @ExitCode)
If ExitCode <> #STILL_ACTIVE
Break
EndIf
EndIf
Next
If ExitCode<>#STILL_ACTIVE
Debug Str(ExitCode) ;Exit code of external app
Else
´ Debug "Timeout" ;ShellExecute still not finished
EndIf
EndIf
Athlon64 3800+ · 1 GB RAM · Radeon X800 XL · Win XP Prof/SP1+IE6.0/Firefox · PB 3.94/4.0
Intel Centrino 1.4 MHz · 1.5 GB RAM · Radeon 9000 Mobility · Win XP Prof/SP2+IE6.0/Firefox · PB 3.94/4.0
Intel Centrino 1.4 MHz · 1.5 GB RAM · Radeon 9000 Mobility · Win XP Prof/SP2+IE6.0/Firefox · PB 3.94/4.0
- Hroudtwolf
- Addict
- Posts: 803
- Joined: Sat Feb 12, 2005 3:35 am
- Location: Germany(Hessen)
- Contact: