|
-
May 20th, 2001, 03:58 AM
#1
number of units
how can i know the number of units in a computer ( e.g. c:\,g:\, ecc)
using ONLY the api?
-
May 20th, 2001, 07:11 AM
#2
Frenzied Member
Code:
Dim LDs As Long, Cnt As Long, sDrives As String
'get the available drives
LDs = GetLogicalDrives
sDrives = "Available drives:"
For Cnt = 0 To 25
If (LDs And 2 ^ Cnt) <> 0 Then
sDrives = sDrives + " " + Chr$(65 + Cnt)
End If
Next Cnt
form1.caption = sDrives
-
May 20th, 2001, 07:11 AM
#3
Frenzied Member
You will also need this
Code:
Declare Function GetLogicalDrives Lib "kernel32" Alias "GetLogicalDrives" () As Long
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|