|
Home > Archive > Programming with dBASE > March 2006 > QUIT WITH n
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Graham Monk 2006-03-07, 3:23 am |
| I am running a dBase (2.2.1) program from within inno setup (5.1.4) to do
some checking before allowing the install to progress. For testing I have a
one line dBase program "QUIT WITH 5", but always get return code 1 back! Has
anybody got any ideas as to why I cannot get the correct return code back
please.
Graham
INNO code block:
[Code]
function NextButtonClick(CurP
ageID: Integer): Boolean;
var
ResultCode: Integer;
begin
Result := True;
if CurPageID = wpReady then begin
{ read the ver and maint date if not correct return false }
ExtractTemporaryFile
('ver_check.exe');
if not Exec('plusrun.exe', ExpandConstant('{tmp}\ver_check.exe'), '',
SW_SHOWNORMAL, ewWaitUntilTerminate
d, ResultCode) then
MsgBox('NextButtonCl
ick:' #13#13 'The file could not be executed. ' +
SysErrorMessage(Resu
ltCode) + '.', mbError, MB_OK);
BringToFrontAndResto
re();
MsgBox('Return Code ' + IntToStr(ResultCode)
, mbInformation, MB_OK);
if ResultCode <> 0 then
Result := False;
end;
end;
| |
| Ivar B. Jessen 2006-03-07, 3:23 am |
| On Tue, 7 Mar 2006 15:28:08 +1300, in dbase.programming,
Subject: QUIT WITH n,
Message-ID: <bvLiL#YQGHA.2320@news-server>,
"Graham Monk" < graham@astutesoftwar
e.com> wrote:
>I am running a dBase (2.2.1) program from within inno setup (5.1.4) to do
>some checking before allowing the install to progress. For testing I have a
>one line dBase program "QUIT WITH 5", but always get return code 1 back! Has
>anybody got any ideas as to why I cannot get the correct return code back
>please.
According to the message below the command is broken.
In a later message in the same thread Marty Kay said: "This issue has been
fixed for the next release (2.61)."
Ivar B. Jessen
***********
From: "Marty Kay" <mkay@databi.com>
Subject: Re: QUIT [WITH <expN>]
Date: Wed, 7 Dec 2005 10:03:49 -0500
Organization: dBASE Inc.
Message-ID: <rMc4BC0#FHA.2220@news-server>
Hi Rich,
> This appears to be an old bug, but since it doesn't work and I see no QAID
> for it and I could really use this feature...
> When using
> QUIT WITH <expN>
> The expN never gets passed back to operating system when you exit dBASE
> Plus.
> The exitCode passed back is always 0 (Zero) regardless of the value of
expN.
> I can supply example code if need be.
I checked the implementation of the QUIT command.
Unfortunately, it looks like the exitcode is being thrown away when QUIT
is executed and a 1 is passed to the TerminateProcess() call when dBASE
shuts down.
I've entered QAID: 5659 for this.
- Marty Kay (dBI) -
************
|
|
|
|
|