Results 1 to 3 of 3

Thread: number of units

  1. #1
    irk
    Guest

    Arrow number of units

    how can i know the number of units in a computer ( e.g. c:\,g:\, ecc)
    using ONLY the api?

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    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
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    You will also need this
    Code:
    Declare Function GetLogicalDrives Lib "kernel32" Alias "GetLogicalDrives" () As Long
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width