Hard Drive serial number
Paul Salyers
ps1 at softseven.org
Mon Jan 24 23:42:48 EST 2005
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
Public Function GetSerial(str As String) As Long
Dim Buf$, Name$, Flags&, Length&
Dim Serial As Long
GetVolumeInformation str, Buf$, 255, Serial, Length, Flags, Name$, 255
GetSerial = Serial
End Function
Private Sub Form_Load()
Label1.Caption = GetSerial("C:\") 'This prints the hard drive serial
number of C: here. No other drive is needed.
End Sub
This is the code I have in VB for a hard drive serial number. Can some one
help me convert this to Rev?
Paul Salyers
PS1 - Senior Rep.
PS1 at softseven.org
Http://ps1.SoftSeven.org
More information about the use-livecode
mailing list