ID Number: Q80645
1.00
WINDOWS
buglist1.00
Summary:
Changing the Path property of a directory list box or a file list box
to a floppy drive with the drive door open or without a disk present
will incorrectly return an "Error: 68 Device unavailable" (rather than
"Error: 71 Disk not ready").
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:
The following definitions for errors 68 and 71 can be found in the
Visual Basic online Help:
Error 68 Device Unavailable
---------------------------
The device you are trying to access is not online or does not exist.
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 attempts to change the Path property of a directory or
file list box to a drive when its door is open or if a disk is not
present, error 68 incorrectly occurs rather than error 71, as
illustrated in the following example.
Note: Attempting to open a file from a drive with its drive door open
or disk missing will correctly generate an Error 71, "Disk Not Ready."
Example
-------
1. Start Visual basic, or from the File menu, choose New Project
(ALT, F, N) if Visual Basic is already running. Form1 will be
created by default.
2. Create the following controls on Form1:
Control CtrlName
------- --------
Drive list box Drive1
File list box File1
3. Add the following code to the Drive1_Change event procedure:
Sub Drive1_Change ()
On Error GoTo Trap
File1.path = drive1.drive
Exit Sub
Trap:
MsgBox "Error:"+Str$(Err)+" "+Error$(Err)
Resume Next
End Sub
4. From the Run menu, choose Start (ALT, R, S) to run the program.
Changing the drive in the drive list box to a drive without a disk or
with its drive door open will cause a message box to display:
Error: 68 Device unavailable
The correct error message should be:
Error: 71 Disk not ready
Additional reference words: 1.00