Results 1 to 4 of 4

Thread: how to get cpu serial number

  1. #1

    Thread Starter
    Hyperactive Member Jupiter-SL9's Avatar
    Join Date
    Apr 2001
    Location
    Porto Alegre
    Posts
    289

    Question

    there is a way to retrieve cpu serial number?
    any api for this?

    daniel
    If you want to be loved, first love who God gave to you.

    "Se você quer ser amado, primeiro ame quem Deus te deu"

    (Acts 20:35)

  2. #2
    Addicted Member Babbalouie's Avatar
    Join Date
    Jan 2001
    Location
    On the bright, blue sea...
    Posts
    197
    Here's code to get the HARD DRIVE serial number...

    BAS Module:
    Code:
    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

    Routine:
    Code:
    Public Function GetHardDriveSerialNumber() As Long
    
    Dim strVolumeBuffer As String
    Dim strSysName As String
    Dim lngSerialNumber As Long
    Dim lngSysFlags As Long
    Dim lngComponentLen As Long
    Dim lngResult As Long
        
        strVolumeBuffer$ = String$(256, 0)
        strSysName$ = String$(256, 0)
        lngResult = GetVolumeInformation("C:\", strVolumeBuffer$, 255, lngSerialNumber, lngComponentLen, lngSysFlags, strSysName$, 255)
                     
        GetHardDriveSerialNumber = lngSerialNumber
    
    End Function
    Building A Better Body Albeit Left Out Under Intense Extrapolation

  3. #3
    Member
    Join Date
    Aug 1999
    Location
    Bahrain
    Posts
    41
    the only problem with Volume serial number is that when the harddisk formated, the serial number will change.

  4. #4
    PowerPoster
    Join Date
    Aug 2000
    Location
    India
    Posts
    2,288
    Is there anything that remains constant even after a formatting and clean reload of OS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width