How to get a process Exit Code?
Hello guys c:
So, I'm trying to start a process from VB and get the ExitCode when the process end.
This process is a C program that can return 0 in case of sucess, -1 or -2 in case of error.
I would like to manipulate my VB program according to the exit code to show the user what happens and why.
I tryed using MyProcess.ExitCode (MyProcess is a Process variable), but it says the program should exit before using this code. Then I tryed using MyProcess.Close() and then MyProcess.ExitCode, but it says there was no process attached to MyProcess.
Anyone know a way to do it?
Thank you guys and sorry for any grammar error.
So, I'm trying to start a process from VB and get the ExitCode when the process end.
This process is a C program that can return 0 in case of sucess, -1 or -2 in case of error.
I would like to manipulate my VB program according to the exit code to show the user what happens and why.
I tryed using MyProcess.ExitCode (MyProcess is a Process variable), but it says the program should exit before using this code. Then I tryed using MyProcess.Close() and then MyProcess.ExitCode, but it says there was no process attached to MyProcess.
Anyone know a way to do it?
Thank you guys and sorry for any grammar error.
That'll be how you would get the process by anme, id, ect..