Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Serial nos of hard disk
Message
 
To
16/09/1999 13:41:40
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00265560
Message ID:
00265581
Views:
25
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform