Click to See Complete Forum and Search --> : Shell program execution


jinnu
November 29th, 1999, 03:48 AM
I'm running an exe (of a .c file) tho' my vb application using 'Shell' function provided. The exe returns exit status tho' exit statement. How can I get the status code in my vb application which has invoked the exe?
Please help.

Ravi Kiran
November 29th, 1999, 03:59 AM
You cannot get it using Shell.

For this use CreateProcess api , to start the process, then if reqquired for it to finish, use WaitForSingleObject to wait till it finishes, and then use GetExitCodeProcess.

Check on this site for sample codes. i am sure you should find some.

RK