How can i send an exit code with a VB App? It's to be test with errorlevel in a batch file.
Printable View
How can i send an exit code with a VB App? It's to be test with errorlevel in a batch file.
There's an API that'll do taht for you:
private Declare Sub ExitProcess Lib "kernel32.dll" Alias "ExitProcess" _
(byval uExitCode as Long)
I'm not too sure whether you'll catch the errorlevel if the application has a Window's GUI (you may have to go the console way), but give it a bash.
Thank you! It works!
The API call always makes my application crash because of a memory access violation. Any ideas why?
Daniel