return value from main to application invoker

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

hi ng,

i want to give the invoker of my application information whether
application has passed successfully.
it shall get scheduled, and if the exeution did not pass, it should be
repeated some minutes later.
may i use the static int Main return value?
if that was the solution, so how do i provide that value?
i have invoked the app from dos cmd, but nothing has been returned, or
at least printed on the screen.

thanks for your help,
dan
 
Hi Dan,
may i use the static int Main return value?

Yes, you should use this one.
if that was the solution, so how do i provide that value?
i have invoked the app from dos cmd, but nothing has been returned, or at
least printed on the screen.

This value is stored to the %ERRORLEVEL% environment variable. Write the
following CMD file to test it:

@MyApp.exe
@ECHO %ERRORLEVEL%
 
Back
Top