Results 1 to 2 of 2

Thread: Serial For c: drive

  1. #1

    Thread Starter
    Frenzied Member JasonLpz's Avatar
    Join Date
    Mar 2001
    Location
    Brooklyn, NY
    Posts
    1,335

    Serial For c: drive

    Im on winxp and 98 . I use the
    VB Code:
    1. Public Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" _
    2.    (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

    code. but it the serial part returns a 0 when i select a hdd with xp. And i have a hdd 120 gig partitioned and i get a 0 on both hdd's
    - JayWare
    Live to love. Not to Hate

    Im to busy to have a site. But I got one and still working on it.

    http://dre3k.net/

  2. #2
    Hyperactive Member
    Join Date
    Mar 2002
    Location
    India
    Posts
    342
    Option Explicit
    Dim fso As FileSystemObject
    Dim drvs As Drives
    Dim drv As Drive

    Private Sub Form_Load()
    Set fso = New FileSystemObject 'Create the File System Object
    Set drvs = fso.Drives 'Extract the drives from the object
    'Extract and display the info from each drive object
    For Each drv In drvs
    With drv
    If .IsReady Then
    Debug.Print "Volume name - " & .VolumeName
    Debug.Print "SeriaNumber - " & .SerialNumber
    End If
    End With
    Next
    End Sub
    ksm

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