Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DriveType/GetDriveType Vista issue
Message
De
18/06/2008 16:01:58
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brésil
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Divers
Thread ID:
01325108
Message ID:
01325231
Vues:
13
Hi Naomi.
First and second approaches listed in Sergey's site doesn't work because uses DriveType function.
I've not tested the third approach (using a Shell object) yet, but for now, I've found a workaround:

Inside the loop through A-Z drives, I'm testing if this drive type is 3 or 4. I've added an else with Directory function to see if root directory exists and get the desired results. Something like this:
If Inlist(DriveType("A:"),3,4)
   * My code here
Else
   If DriveType("A:")==1 And Directory("A:\")
      * My code here
   Endif
Endif
So, here comes a new question...
Why DriveType function return a wrong drive type if I can access this drive normally with Directory function?
Emerson Santon Reed
"One Developer CAN Make a Difference. A community CAN make a future." - Craig Boyd
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform