Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hard drives
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00529293
Message ID:
00529948
Views:
14
>>Hi,
>>sorry to ask... I think I've already read a thread about this... but I can not use search options... so if someone can help me...
>>
>>How do I know how many fixed drives has a machine? and their letter..
>>
>>sorry again.
>fabian,
>
>The easiest way is possibly the API call GetLogicalDriveStrings()
DECLARE INTEGER GetLogicalDriveStrings IN Win32API;
>  INTEGER dwSize, STRING @lpBuffer
>lcbuffer = SPACE(130)
>lnsize = LEN(lcbuffer)
>IF GetLogicalDriveStrings(lnsize, @lcbuffer) > 0
>  lcbuffer = CHRTRAN(lcbuffer, CHR(0), CHR(13) + CHR(10))
>  DIMENSION a_drives[1]
>  = ALINES(a_drives, lcbuffer)
>  FOR lni = 1 TO ALEN(a_drives, 1)
>    ? a_drives[lni]
>  NEXT
>ELSE
>  ? "No drives???"
>ENDIF
Thanks for the post George!
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform