سورس بدست آوردن درایوهای منطقی سیستم

Private Declare Function GetLogicalDriveStrings Lib "kernel32" Alias 
"GetLogicalDriveStringsA" (ByVal nBufferLength As Long, ByVal lpBuffer As
String) As Long
Private Sub Form_Load()
Me.AutoRedraw = True
Drives = GetMyLogicalDrives
For i = 0 To UBound(Drives)
Print Drives(i)
Next
End Sub
Public Function GetMyLogicalDrives()
Dim strBuffer As String
strBuffer = String(255, Chr$(0))
ret& = GetLogicalDriveStrings(255, strBuffer)
strBuffer = Replace(strBuffer, Chr(0), " ")
strBuffer = Trim(strBuffer)
strDrives = Split(strBuffer)
GetMyLogicalDrives = strDrives
End Function