Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to test if a floppy is inserted ?
Message
From
13/01/2005 13:36:16
 
 
To
13/01/2005 06:58:37
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00976706
Message ID:
00976861
Views:
13
This message has been marked as a message which has helped to the initial question of the thread.
Here's the function from our procedure library we use:
FUNCTION CheckDriveA
#define SEM_FAILCRITICALERRORS      0x0001
   
*-- SetErrorMode determines whether the system handles
*-- serious errors or whether the program handles them.
DECLARE INTEGER SetErrorMode in win32api INTEGER
*-- SetErrorMode returns what the flags were last set.
lnOldMode = SetErrorMode(SEM_FAILCRITICALERRORS)
*-- Test the FoxPro DISKSPACE() function.  If you get a -1, then
*-- there is no disk in the drive.\
lnReturnVal = .T.
IF DISKSPACE("a:") = -1
   lnReturnVal = .F.
ENDIF
*-- Restore system error handling settings.
= SetErrorMode(lnOldMode)
RETURN lnReturnVal
>How can I test if a floppy is inserted ?
>Thank you ?
>Alessio

(On an infant's shirt): Already smarter than Bush
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform