Identifying a Cd from another CD

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Pramuditha
    New Member
    • Nov 2006
    • 7

    #1

    Identifying a Cd from another CD

    Is there a way how I can identify a CD?
    I want 2 create a CD player which identifies previously inserted CDs and automaticly play a playlist. To do so I need a way to distinguish a CD from a different CD. can anyone help me?
  • albertw
    Contributor
    • Oct 2006
    • 267

    #2
    Originally posted by Pramuditha
    Is there a way how I can identify a CD?
    I want 2 create a CD player which identifies previously inserted CDs and automaticly play a playlist. To do so I need a way to distinguish a CD from a different CD. can anyone help me?
    hi

    may be some use to u

    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
    Private Sub Form_Load()
    Dim LVSN As Long, n As Long, s1 As String, s2 As String
    s1 = String$(255, Chr$(0))
    s2 = String$(255, Chr$(0))
    n = GetVolumeInformation("e:", s1, Len(s1), LVSN, 0, 0, s2, Len(s2))
    'The value returned in LVSN (Volume Serial Number) is the CD identification number.
    End Sub

    Comment

    Working...