detect cdrom status


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: detect cdrom status

  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    detect cdrom status

    [Originally posted by AhBoon]

    how do i detect whether my cdrom is opened or closed?? lets say my coding is

    if cdrom status is opened then
      close my cdrom
    else
      open my cdrom
    endif

    how m i going to detect "cdrom status"?? thanks for help! ^_^

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:detect cdrom status

    [Originally posted by Ryan]

    i dont think this is possible. you can tell whether a cd is in the drive or not but not if the door is closed or open. You can tell whether a disk is in the drive or not and by subclassing tell when the door is opened or closed. but there is no way to tell what state the cd drive door is in when your program starts. A workaround might be too close all the drive doors when your program starts so you know they are all closed and then detect when the drives are opened and closed. This is fairly complex code if you want it email me and i'll send it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center