Board index » delphi » IORESULT =0 in Win 95, = 3 in Win 3.1

IORESULT =0 in Win 95, = 3 in Win 3.1

When executing:

{$I-}
 ChDir('Newdir');
{$I+}

   IOresult=0 in Win 95, but IOresult=3 in Win 3.1   This occurs when I
try to change to the "NewDir" directory while I'm already in that
directory. I suppose the "error" is that no change is taking place, but
this is not an error in WIn95.

I have been unable to find any IOResult error numbers in the Delphi
documentation.  Could someone point me toward them.  In TP, the ioresult
error numbers were all greater than 100 (if I remember correctly).

What's going on here?  Why would win95 and win 3.1 act differently?  

 

Re:IORESULT =0 in Win 95, = 3 in Win 3.1


Quote
b...@aa.net (Bob Richardson) wrote:
>When executing:

>{$I-}
> ChDir('Newdir');
>{$I+}

>   IOresult=0 in Win 95, but IOresult=3 in Win 3.1   This occurs when I
>try to change to the "NewDir" directory while I'm already in that
>directory. I suppose the "error" is that no change is taking place, but
>this is not an error in WIn95.

I'm sure "Uncle Bill" has some really good reason for that behavior.
Maybe 200,000 people called and said they got an error under DOS and
Win3.1 when they cd'd to the directory they were already in; removing
that one "senseless" error message might have saved him enough money
in support expenses to install the weather stripping around one of
the windows in his new home.

Quote

>I have been unable to find any IOResult error numbers in the Delphi
>documentation.  Could someone point me toward them.  In TP, the ioresult
>error numbers were all greater than 100 (if I remember correctly).

>What's going on here?  Why would win95 and win 3.1 act differently?  

I have always had trouble with these codes, so I made a reference card
for them.  The Error 3 is one of the DOS error messages. I think I got
these out of a Turbo-Pascal 4 manual, if my aging memory serves me
correctly. The ones I have listed are:

DOS Errors (reported by IOResult):
0:  No error
1:  Invalid DOS function Number
2:  File not found
3:  Path not found
4:  Too many open files
5:  File access denied
6:  Invalid file handle
12: Invalid file access code
15: Invalid drive number
16: Cannot remove current directory
17: Cannot rename across drives

I/O Errors (also reported by IOResult):
100: disk read error
101: Disk write error
102: File not assigned
103: File not open
104: File not open for input
105: File not open for output
106: Invalid numeric format

Critical errors:
150: Disk is write-protected
151: Unknown unit
152: Drive not ready
153: Unknown command
154: CRC error in data
155: Bad drive request structure length
156: Disk seek error
157: Unknown media type
158: Sector not found
159: Printer out of paper
160: Device write fault
161: Device read fault
162: Hardware failure

Fatal errors:
200: Division by zero
201: Range check error
202: Stack overflow error
203: Heap overflow error
204: Invalid pointer operation
206: Floating point underflow
207: Invalid floating point operation
208: Overlay manager not installed
209: Overlay file read error

Boy doesn't that bring back memories! Real hardware failures
common enough that code had to worry about them! Run-time
error codes! Sector number range checking. Ah, those were
the days.

Many of the above are likely to be out of use, but I know
the DOS and IO errors are still used. Why, just the other
day I got an error type 5. But that's another story for
another day, "eh sonny"?

I hope this information helps.

Best regards,

Thom Randolph
t...@halcyon.com

(Occasional firm cheek-area tongue planting, mind you. Just
because I live near and have to observe the hillside destruction
that is his new manse, doesn't mean I have to like or respect
the guy!)

Other Threads