Make your own free website on

[an error occurred while processing this directive]
Private Declare Function GetLogicalDriveStrings Lib "kernel32" Alias "GetLogicalDriveStringsA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
Private Sub Form_Load()
    'KPD-Team 1998
    Dim strSave As String
    'Set the graphic mode to persistent
    Me.AutoRedraw = True
    'Create a buffer to store all the drives
    strSave = String(255, Chr$(0))
    'Get all the drives
    ret& = GetLogicalDriveStrings(255, strSave)
    'Extract the drives from the buffer and print them on the form
    For keer = 1 To 100
        If Left$(strSave, InStr(1, strSave, Chr$(0))) = Chr$(0) Then Exit For
        Me.Print Left$(strSave, InStr(1, strSave, Chr$(0)) - 1)
        strSave = Right$(strSave, Len(strSave) - InStr(1, strSave, Chr$(0)))
    Next keer
End Sub

Copyright © 1998-2000, The KPD-Team.
Send mail to with comments about this web site.
This site is located at