Getting Hard Drive Serial number
Private Declare Function GetVolumeInformation Lib "kernel32"
Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal
lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long,
lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long,
lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String,
ByVal nFileSystemNameSize As Long) As Long
Dim VolBuffer As String
Dim FileSystem As String
Dim SerialNum As Long
Dim SysFlags As Long
Dim ComponentLength As Long
Dim Result As Long
VolBuffer = String$(256, 0)
FileSystem = String$(256, 0)
Result = GetVolumeInformation("C:\", VolBuffer, 255, SerialNum,
ComponentLength, SysFlags, FileSystem, 255)
If Result = 0 Then
'Can't Find out the Serial Number of the Hard Drive
End If
Sent via Deja.com http://www.deja.com/
Before you buy.