Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
From The Pages of FPA
Message
From
28/03/2000 23:32:16
 
 
To
28/03/2000 23:15:05
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00351646
Message ID:
00351881
Views:
24
>George,
>
>Not to rain on the parade here, but, out of curiosity, I tried this code on my Windows2000 Professional box. If I DISKSPACE(tcDrive) and tcDrive does not exist, I get a return value of -1.
>
>No errors, no mess. So what am I doing right (or wrong)?
>

It may be that CreateProcess() is by default passing through critical errors to VFP to process; under NT, it fires up an A/R/I messagebox at the OS level in respoonse to no media in the drive.

>
>
>>In light of or more of the recent threads in this area, here's a little something from the "Advisor Tips" section of FPA. As a side note, I find it interesting that Steve Sawyer is no longer the editor of this column.
>>
>>The title of this gem is "Determine if a Drive Exists". Without getting into any of the text, it has the following RETURN:
RETURN (DISKSPACE(tcDrive) > 0)
where tcDrive is the drive in question.
>>
>>Only one problem...under NT you get a nasty error dialog if SetErrorMode() isn't properly called (and later restored to it's original state) to disable it.
>>
>>Now if you're going to be mucking about with API anyway, then...
DECLARE INTEGER GetLogicalDrives IN Win32API
>>RETURN BITTEST(GetLogicalDrives(), ASC(UPPER(tcDrive)) - 65)
>>
>>gets the job done very cleanly.
>>
>>Back in the January, 2000 issue, while Steve was still the Contributing Editor, there was a tip that synchronized the VFP _DBLCLICK system variable with the setting the user had established in the Control Panel:
DECLARE INTEGER GetDoubleClickTime IN Win32API
>>_DBLCLICK = GetDoubleClickTime() / 1000
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform