By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,593 Members | 2,006 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,593 IT Pros & Developers. It's quick & easy.

Identifying a Cd from another CD

P: 7
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?
Nov 16 '06 #1
Share this Question
Share on Google+
1 Reply


100+
P: 267
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

Expand|Select|Wrap|Line Numbers
  1.  
  2. 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
  3. Private Sub Form_Load()
  4. Dim LVSN As Long, n As Long, s1 As String, s2 As String
  5. s1 = String$(255, Chr$(0))
  6. s2 = String$(255, Chr$(0))
  7. n = GetVolumeInformation("e:", s1, Len(s1), LVSN, 0, 0, s2, Len(s2))
  8. 'The value returned in LVSN (Volume Serial Number) is the CD identification number.
  9. End Sub
  10.  
  11.  
  12.  
Nov 16 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.