Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Serial Number - Motherboard/Hard Disk
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00660123
Message ID:
00774980
Views:
17
The following code returns serial number for C: volume
DECLARE SHORT GetVolumeInformation IN kernel32;
	STRING lpRootPathName, INTEGER lpVolumeNameBuffer,;
	INTEGER nVolumeNameSize, INTEGER @lpVolumeSerialNumber,;
	INTEGER lpMaximumComponentLength, INTEGER lpFlags,;
	INTEGER lpFileSystemNameBuffer, INTEGER nFileSystemNameSize

cSerial = 0
IF GetVolumeInformation('c:\', 0,0, @cSerial, 0,0,0,0) <> 0
	? "Volume Serial Number:", cSerial
ENDIF
The GetVolumeInformation is declared in a simplified way in the code above.

Check complete version of this code sample:
Basic Volume Information
http://www.news2news.com/vfp/?example=98&function=145
Previous
Reply
Map
View

Click here to load this message in the networking platform