Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I determine which drive is the CD ROM drive?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00317538
Message ID:
00317866
Views:
16
Drat! One parenthesis short
DECLARE INTEGER GetLogicalDriveStrings IN Win32API;
  INTEGER nBufferLength, STRING @lpBuffer
lcbuffer = SPACE(100)
lnsize = LEN(lcbuffer)
IF GetLogicalDriveStrings(lnsize, @lcbuffer) > 0
  lcbuffer = CHRTRAN(lcbuffer, CHR(0), CHR(13))
  lndrives = Words(lcbuffer, CHR(13)) && Get the number of drives
  FOR lni = 1 TO lndrives
    ? DRIVETYPE(WordNum(lcbuffer, lni, CHR(13)))
  NEXT
ENDIF
There...that's better.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform