The system exit code is set to the return value of the function, main, or zero if main returns void. Translated to VB a 'void' method is a Sub method, that is no return value. A default VB.Net console application with a Sub Main will return zero when it finishes, or something else if it fails.
Here is some code from documentation you can use to check exitcode:
(change 'filename' to the real path of your or any application.)
Dim newProc As Diagnostics.Process = Diagnostics.Process.Start(filename)
Dim procID As Integer = newProc.Id
Dim procEC As Integer = -1
If newProc.HasExited Then procEC = newProc.ExitCode
MsgBox("Process with ID " & CStr(procID) & " terminated with exit code " & CStr(procEC))