Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Safe way to create a directory
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00578887
Message ID:
00580057
Vues:
33
This message has been marked as a message which has helped to the initial question of the thread.
I use this routine. I like it because it does not need to have WSH installed.

? IsReady("A")


***
* Function IsReady(cDrive)
***
Function IsReady(cDrive)
Local cString1, cString2, nDummy1, nDummy2, nDummy3

Declare Long GetVolumeInformation In Win32API ;
String lpRootPathName, String pVolumeNameBuffer, ;
Long nVolumeNameSize, Long @lpVolumeSerialNumber, ;
Long lpMaximumComponentLength, Long lpFileSystemFlags, ;
String lpFileSystemNameBuffer, Long nFileSystemNameSize

cString1 = Space(256)
cString2 = Space(256)
nDummy1 = 0
nDummy2 = 0
nDummy3 = 0

If GetVolumeInformation(cDrive + ":\" + Chr(0), cString1, 256, nDummy1, nDummy2, nDummy2, cString2, 256) <> 0
Return(.T.)
else
Return(.F.)
Endif
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform