Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using API
Message
From
24/10/1996 12:26:21
 
 
To
23/10/1996 19:23:25
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00010623
Message ID:
00010873
Views:
33
>I sent him the info on the GetVolumeInformation and an example on how to use it in VFP.

I have try the code but it allways return wait wind "error". I am sure there is a mistake in variable but I not so good in C. If somewone can help me!


declare integer GetVolumeInformation IN Win32API as GVI;
string @lpRootPathName,;
string @lpVolumeNameBuffer,;
integer @nVolumeNameSize,;
string @lpVolumeSerialNumber,;
string @lpMaximumComponentLength,;
string @lpFileSystemFlags,;
string @lpFileSystemNameBuffer,;
integer @nFileSystemNameSize

lpRootPathName="C:\"
lpVolumeNameBuffer=repl("X",256)
nVolumeNameSize=0
store space(256) to;
lpVolumeSerialNumber,;
lpMaximumComponentLength,;
lpFileSystemFlags,;
lpFile1SystemNameBuffer
nFileSystemNameSize=0

if GVI( @lpRootPathName,;
@lpVolumeNameBuffer,;
@nVolumeNameSize,;
@lpVolumeSerialNumber,;
@lpMaximumComponentLength,;
@lpFileSystemFlags,;
@lpFile1SystemNameBuffer,;
@nFileSystemNameSize) = 0
wait wind "ERROR"
else
for i=1 to 100
if asc( substr( lpVolumeNameBuffer, i, 1)) = 0
exit
endif
endfor
lpVolumeNameBuffer=left( lpVolumeNameBuffer, i-1)
? lpVolumeNameBuffer
endif
clear dlls
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform