[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

How to find the type of the CD

Posted on 1999-11-29
5
Medium Priority
?
216 Views
Last Modified: 2013-12-03
Hi Friends,

   Can some one guide me to find whether the inserted CD is an audio or video or data cd.

  If the CD is an audio CD, then how to play the audio files.

  Thanks for your guidance.

Shiva

shiva@indusaglobal.com
0
Comment
Question by:nsivatg
  • 3
  • 2
5 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 60 total points
ID: 2241424
Some CD-ROMs may also contain audio tracks. To detect if there is any audio track, try opening the cdaudio device. See

Playing a Compact Disc Track
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/psdk/multimed/mci_45d7.htm


Use MCI or MCIWnd window class to play audio CDs.

MCIWnd Window Class
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/psdk/multimed/mciwnd_5uer.htm

MCI
http://msdn.microsoft.com/isapi/msdnlib.idc?theURL=/library/psdk/multimed/mci_7vvt.htm

A Cd-audio class to build a simple CD player
http://www.codeguru.com/multimedia/cd_audio.shtml
0
 

Author Comment

by:nsivatg
ID: 2241599
Still, How do I check whether the CD inserted is a audio or a data CD?

Any suggestions.

Thank you

Shiva
0
 
LVL 23

Expert Comment

by:chensu
ID: 2241694
Try GetVolumeInformation. This function may fail with an audio CD.
0
 

Author Comment

by:nsivatg
ID: 2241784
But is there a facility in Win API to find the type of CD which could be audio or video or data etc.,

Similar to GetDriveType() API.

Thanks for your ideas.

GetVolumeInformation may return an error if the CD is unformatted which might pose a problem to us. So, how do we overcome this error?


Siva
0
 
LVL 23

Expert Comment

by:chensu
ID: 2241827
>But is there a facility in Win API to find the type of CD which could be audio or video or data etc.,

No.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question