Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetDiskFreeSpaceEx() in WIN32API
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00315812
Message ID:
00317729
Views:
27
>The function is available only with Win95 OSR 2 and later (as mentioned in my FAQ).

Right, then I've modified your code so that it'll use getdiskfreespace() on computers that do not have OSR2 or later:

if getversionex(@lcstruct) # 0
* Check if this is VER_PLATFORM_WIN32_WINDOWS
if stringtointeger(substr(lcstruct, 17, 4)) = 1
* Check if OSR2 or later
if stringtointeger(substr(lcstruct, 13, 4)) > 1000
*use new function... getdiskfreespaceex()
else
*use old function... getdiskfreespace()
endif
endif
endif

It didn't work, the stringtointeger(substr(lcstruct, 13, 4)) > 1000 was .t. on a computer with Win 95 4.00.950a
Doru
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform