General information
Category:
Windows API functions
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only