Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hard Disk Serial Number in Win 98
Message
De
11/01/2006 11:38:18
 
 
À
11/01/2006 10:09:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 7
Divers
Thread ID:
01085545
Message ID:
01085686
Vues:
13
>I have used the following to determine the serial:
>
>
>DECLARE INTEGER GetVolumeInformation IN WIN32API STRING @lpRootPathName, STRING @lpVolumeNameBuffer, ;
>  INTEGER nVolumeNameSize, INTEGER @lpVolumeSerialNumber, INTEGER @lpMaximumComponentLength, ;
>  INTEGER @lpFileSystemFlags, STRING @lpFileSystemNameBuffer, INTEGER nFileSystemNameSize
>lcString          = ""
>lcRoot            = "C:\"
>lcVolumeName      = SPACE(256)
>lnVolumeNameSize  = 256
>lnVolumeSerial    = 0
>lnMaxCompLength   = 256
>lnFileSysFlag     = 0
>lcFileSysNameBuf  = SPACE(256)
>lnFileSysNameSize = 256
>lnReturn = GetVolumeInformation(@lcRoot,@lcVolumeName,lnVolumeNameSize,@lnVolumeSerial, ;
>				@lnMaxCompLength,@lnFileSysFlag,@lcFileSysNameBuf,lnFileSysNameSize)
>IF lnVolumeSerial < 0
>  lnVolumeSerial = 4294967296 + lnVolumeSerial
>ENDIF
>
>
>Not sure if this will work in Win98...

Hi Greg,

Please read the other thread I mentioned in my reply to Somesh :)
BTW, yes GetVolumeInformation() works on Win9X/ME

Regards
Herman
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform