Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Preventing windows hardware error checking - API call 1998-04-15 -- Jeff Slarve >In CW 4a 16 it using 2.003 templates I'm trying to use floppy disks for
>some functions. I'm looking for a way to find out if there is a way to
>trap the Cancel - Retry when the user has not got a floppy in the
>drive. Even _DOSACCESS will pop up that error if there is no floppy in
>the drive unless you have used the drive before hand.
Use SetErrorMode():
Module('WinAPI')
SetErrorMode(UNSIGNED),UNSIGNED,PASCAL
end
Here is a snippet:
If (( DriveType = Drive_Removable) and LOC:NoFloppy )|
or (( DriveType = DRIVE_CDROM ) and LOC:NOCD )
Return
end
DummyLong = SetErrorMode(1) !Get control from Windows
SETPATH( Clip( DQ:Drive ) & ':\')
IF ~ERRORCODE()
Add( DriveQ )
End
DummyLong = SetErrorMode(0) !Give control back to Windows
Today is November 21, 2024, 3:55 am This article has been viewed 35196 times.
|
|