I am using the following code to test for all available devices:
For k% = 1 To 26
FileName$=Chr$(64+k%)+":/"
If FileType(FileName$)=2 Then
'
' get volume info and drive type
'
EndIf
Next
The code works fine and I am able to retrieve the information for all available drives without problems - as long as I'm running it in fullscreen mode. As soon as I run it in windowed mode, I get the following error when filename$="A:/" and no disk is inserted:
Windows - No Disk
Exception Processing Message c0000013 Parameters 75b6bf9c 4 75b6bf9c 75b6bf9c
Cancel | Try Again | Continue
What I don't understand is that although the A: drive grinds for a second or two in both fullscreen and windowed mode, the error only appears in windowed mode - and stops program execution. Surely BlitzMax should deal with this type of Exception no matter what the screen mode?
Does anyone know of a way to make FileType("A:/") with no disk inserted work without the Exception message in windowed mode?
|