Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to test if a floppy is inserted ?
Message
De
13/01/2005 13:36:16
 
 
À
13/01/2005 06:58:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
00976706
Message ID:
00976861
Vues:
12
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform