ID Number: Q79373
1.00
WINDOWS
buglist1.00
Summary:
When trying to open a file for output on a write protected disk, a
Visual Basic program incorrectly returns error message 71, "Disk
Not Ready" (rather than error 70, "Permission Denied").
Microsoft has confirmed this to be a problem in Microsoft Visual Basic
programming system version 1.0 for Windows. We are researching this
problem and will post new information here as it becomes available.
This problem occurs when you run the program both in the VB.EXE
environment and as an .EXE file.
More Information:
You will find the following correct definitions for errors 70 and 71
by searching under trappable errors in Visual Basic online Help
(press F1 for Help in VB.EXE):
Error 70 "Permission Denied"
An attempt was made to write to a write-protected disk or to access
a locked file. For example this error will occur if an Open For
Output statement is performed on a write-protected file.
Error 71 "Disk Not Ready"
There is no disk in the drive specified or the drive door is open.
Insert a disk in the drive, close the door and retry the operation.
When a program tries to create a file on the protected disk, error 71
incorrectly occurs, as shown in the program below. The correct error
message should be 70.
Example
-------
Start Visual Basic and add the following code to the Form1 Click event
procedure:
Sub Form1_Click()
Open "a:bigone" For Output as #1
End Sub
Put a write-protected disk in your disk drive, then run the program
and click on the form. Your drive light will come on and Visual Basic
will report a "Disk Not Ready" error. If you set up an On Error
routine to trap the error, the Err function incorrectly returns error
number 71, meaning "Disk Not Ready." (The same results occur in an
.EXE file.)
Additional reference words: 1.00