Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DriveType/GetDriveType Vista issue
Message
 
 
To
18/06/2008 16:01:58
Emerson Reed
Folhamatic Tecnologia Em Sistemas
Americana - São Paulo, Brazil
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Miscellaneous
Thread ID:
01325108
Message ID:
01325254
Views:
10
>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?

Which SP version you're testing this?

In any case, I can not answer your questions, sorry.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform