Solved

DOS Errorlevel

Posted on 1997-11-04
1
1,089 Views
Last Modified: 2008-03-10
How can I set a DOS errorlevel,while exiting a Delphi aplication liked as a console aplication.
0
Comment
Question by:cynolebias
1 Comment
 
LVL 3

Accepted Solution

by:
mirek071497 earned 50 total points
ID: 1349474
ExitProcess( errnr ) or Halt( errnr )

However you may have some difficulties with using this, because in WinNT you can't set errorlevel for other process.

example

in any.bat you can't use this :

myprog.exe
if errorlevel==2 ....

this is because myprog.exe can't set environment for any.bat which is other process.


0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FMX StringGrid1->Canvas->FillRect Problem 3 153
Comparing dates in Delphi. Greater than/ Less than 3 155
DBGrid or StringGrid ? 6 90
RESTRequest Parameter 4 31
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question