Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using API
Message
De
24/10/1996 12:26:21
 
 
À
23/10/1996 19:23:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00010623
Message ID:
00010873
Vues:
34
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform