Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Safe way to create a directory
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00578887
Message ID:
00580057
Views:
32
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
Previous
Reply
Map
View

Click here to load this message in the networking platform