Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is Disk In--How to Tell?
Message
 
 
À
06/09/2000 14:01:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00413095
Message ID:
00413107
Vues:
24
>How can you tell if a diskette is inserted in a given drive? Is there an API call for this function? Or a VFP command?
> Thanks, Chaim
I took it from here and added to our progs library.
********************************************************************
*  Description.......: IsDriveReady - check if drive is ready to use
*  Calling Samples...: IsDriveReady('a')
*  Parameter List....: 
*  Created by........: Ken Weber 
*  Modified by.......: 
********************************************************************
lParameters cDrive

local oFSO, oFloppy, llRetVal
llRetVal = .F.

oFSO = createobject("Scripting.FileSystemObject")

if oFSO.DriveExists(cDrive)
     oFloppy = oFSO.GetDrive(cDrive)
     llRetVal = oFloppy.IsReady()
endif

return llRetVal
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform