Saber o Número Serial do HD
'Num módulo:
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 DriveSerial(ByVal Drive As _
String) As Long
'Valor que retornará o serial do HD
Dim RetVal As Long
Dim HDNameBuffer As String * 256 'Nome do HD
Dim FSBuffer As String * 256 'FS do HD
Dim a As Long 'auxiliar
Dim b As Long 'auxiliar
Call GetVolumeInformation(Drive, HDNameBuffer, _
256, RetVal, a, b, FSBuffer, 256)
DriveSerial = RetVal
End Function
'P/ usar (no evento que você quizer):
Dim lNSerial As Long
lNSerial = DriveSerial("C:")
MsgBox "O número seirial do HD é: " & lNSerial
veSerial("C:")
MsgBox "O número seirial do HD é: " & lNSerial
achu que este pega o ID do HD... para pegar o numero serial memso... achu que vc soh vai conseguir com assenbly... ou delphi talvez...