Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Serial nos of hard disk
Message
 
À
16/09/1999 13:41:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00265560
Message ID:
00265581
Vues:
24
>is there any way in vfp to obtain the serial nos of the hard disk.

Yes. Here's a sample
DECLARE INTEGER GetVolumeInformation IN Win32API;
  STRING @lpRootPathName,;
  STRING @lpVolumeNameBuffer,;
  INTEGER nVolumeNameSize,;
  INTEGER @lpVolumeSerialNumber,;
  INTEGER @lpMaximumComponentLength,;
  INTEGER @lpFileSystemFlags,;
  STRING @lpFileSystemNameBuffer,;
  INTEGER nFileSystemNameSize
STORE SPACE(260) TO lcvolname, lcfilename
STORE 0 TO lnserialno, lnmaxlen, lnsysflags
STORE 260 TO lnvolsize, lnfilesize
lcroot = "C:\"
lnresult = GetVolumeInformation(@lcroot, @lcvolname, lnvolsize, @lnserialno, @lnmaxlen, lnsysflags, @lcfilename, lnfilesize)
? lnserialno
hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform