How to find the type of the CD

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.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Use MCI or MCIWnd window class to play audio CDs.

MCIWnd Window Class


A Cd-audio class to build a simple CD player

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nsivatgAuthor Commented:
Still, How do I check whether the CD inserted is a audio or a data CD?

Any suggestions.

Thank you

Try GetVolumeInformation. This function may fail with an audio CD.
nsivatgAuthor Commented:
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?

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

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.