473,412 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

return value from main to application invoker

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
Nov 16 '05 #1
1 2178
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%

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Dan" <da**********@zdv.uni-tuebingen.de> wrote in message
news:co**********@newsserv.zdv.uni-tuebingen.de... 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


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Konstantin Zakharenko | last post by:
Hello, Our QA team have running a lot of test scripts (for automated regression testing), they run them on the different databases (Oracle/MS SQL). Several of those tests are dependent on the...
16
by: G Patel | last post by:
Hi, If I want to call functions that don't return int without declaring them, will there be any harm? I only want to assign the function(return value) to the type that it returns, so I don't...
6
by: Sunny | last post by:
Hi, I have a very serious issue at hand. I have created a small C# Console App (Csd.exe) that collects a list of files as its argument and generates their Md5 sets. This application is used by...
3
by: VMI | last post by:
In my Windows application, the main Form (Form_Main) calls a small Form (Form_X) that checks a file. Basically, I pass the name of the file through frmX's constructor and then I display it with...
20
by: lovecreatesbeauty | last post by:
Hello experts, Is the following code snippet legal? If it is, how can exit() do the keyword return a favor and give a return value to the main function? Can a function call (or only this...
6
by: johnnyG | last post by:
Greetings, Since Main() is a subroutine in VB.NET console apps and not a function, is there a way to return a value to a script ro other "caller" for a VB.NET console .exe? sub main() like if...
6
by: Tim Roberts | last post by:
I've been doing COM a long time, but I've just come across a behavior with late binding that surprises me. VB and VBS are not my normal milieux, so I'm hoping someone can point me to a document...
1
by: Troels Arvin | last post by:
Hello, In PostgreSQL, when you create a function, you may choose between SECURITY INVOKER or SECURITY DEFINER: http://www.postgresql.org/docs/8.2/static/sql-createfunction.html When a function...
46
by: Bill Cunningham | last post by:
I have heard that return -1 is not portable. So what would be the answer to portability in this case? What about exit(0) and exit (-1) or exit (1)? Or would it be best to stick with C's macros,...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.