Results 1 to 5 of 5

Thread: Getting harddisk's serial number

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    Jp.
    Posts
    5

    Unhappy

    Is there a way to get a harddisk' serial number or other detail of it. Please...
    thanks.


  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    yes, and i'm just working on it.

  3. #3
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    here is wthe code:
    Code:
    Option Explicit
    Private Declare Function GetVolumeInformation& Lib "kernel32" _
        Alias "GetVolumeInformationA" (ByVal lpRootPathName _
        As String, ByVal pVolumeNameBuffer As String, ByVal _
        nVolumeNameSize As Long, lpVolumeSerialNumber As Long, _
        lpMaximumComponentLength As Long, lpFileSystemFlags As _
        Long, ByVal lpFileSystemNameBuffer As String, ByVal _
        nFileSystemNameSize As Long)
        Const MAX_FILENAME_LEN = 256
    Public Function SerNum(Drive$) As Long
        Dim No&, s As String * MAX_FILENAME_LEN
        Call GetVolumeInformation(Drive + ":\", s, MAX_FILENAME_LEN, _
        No, 0&, 0&, s, MAX_FILENAME_LEN)
        SerNum = No
    End Function
    Sub GetSer()
    MsgBox SerNum(InputBox("Please enter the drive of which you desire the serial number", "Serials"))
    End Sub
    good luck

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Location
    Jp.
    Posts
    5

    Thumbs up

    It good work for your reply, Thanks david.

  5. #5
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    don't mention it, maybe one day you'll help me

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