467,114 Members | 1,241 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,114 developers. It's quick & easy.

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?
Nov 16 '06 #1
  • viewed: 864
Share:
1 Reply
100+
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.

Similar topics

1 post views Thread by David | last post: by
7 posts views Thread by Don Riesbeck Jr. | last post: by
3 posts views Thread by Christopher Weaver | last post: by
13 posts views Thread by malkarouri@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.