BBS: Inland Empire Archive
Date: 02-24-94 (23:19) Number: 319
From: GARY GLUECKERT Refer#: NONE
To: HARRY F. HARRISON Recvd: NO
Subj: Get Dos errorlevel Conf: (2) Quik_Bas
HFH> > Help! I've been trying to find a way to get the dos errorlevel and am
HFH> > having some problems. I'm using INT 21H, AH=4DH as shown below. This
HFH> > interrupt is known as the GET Child-Program Return Value and is
HFH>The problem is this:
HFH>COMMAND.COM always returns 0.
The DOS errorlevel is stored in an interrupt in memory and is not reset
by another copy of command.com. Remember also that not all of
Command.com is transient. Here is a snippet of code I finally found
written in QB that should illustrate the point.
FUNCTION ErrorLevel% ()
DEF SEG = 0
ErrorLevel% = PEEK(&H4FE)
This was found in a file named QBFAQR01.ZIP I found on the Shareware
Studio Volume II CD-ROM. The FAQR actually stands for Frequently Asked
QucikBasic Routines and from what I read it seems as though this echo
conference has everything to do with it. If anyone knows of a later
version of this file please let me know where I can FREQ it from.
For now you may FREQ this file from 1:107/270 with the MAGIC name of
FAQR or you may download it from SUNY Online Services 516-420-0818.
þ OLX 2.1 þ Yeah, Right, Uh-huh, Of Course, Hmmm........... Yawn
--- MsgToss 2.0c
* Origin: The State University of New York at Farmingdale (1:107/270)