Jump to content

Programming question, getting cd drive state


Recommended Posts

Posted

I'm writing a program, and I dont' know how to get the open or closed status of a CD drive. I know it's possible for sure as in ImgBurn it gives you a nice detailed status but I only need open close.

 

Does anybody know what DLL this function is provided and where the documentation for it would be? I checked out the win32 api but it seems more specific than that.

 

Thank you for any replies

Posted

I use the 'TEST UNIT READY' command (see the MMC specs) and then simply display the sense area data if the drive comes back saying 'No, I'm not ready'.

 

If it's ready then there must be a disc in the drive.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.