Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining valid drives
Message
De
08/12/2006 15:21:11
 
 
À
08/12/2006 13:38:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01176193
Message ID:
01176244
Vues:
13
>Hi all,
>
>I want to set something up on a form that will allow the user to select from a list of valid drives on the system (C:, F:, etc.). I'd like to do this with a listbox or a spinner.
>
>How can I determine what the valid drives would be? Once that's determined, how do I get a list of the valid folders on that drive?
>
>Thanks!
>
>John

and, yet, another way is...
    PROCEDURE Logical_Drives_list()

        DECLARE INTEGER GetLogicalDriveStrings IN kernel32;
            INTEGER  nBufferLength,;
            STRING @ lpBuffer

        LOCAL lcDrives
        lcDrives = SPACE(255)

        GetLogicalDriveStrings( LEN(lcDrives), @lcDrives )

        lcDrives = ALLTRIM(STRTRAN(lcDrives,CHR(0),CHR(13)+CHR(10)))

        RETURN lcDrives
    ENDPROC
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform