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%
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top