title: c++ check cdrom status
body: <p>Does anyone have a good way to check the status of a CDROM drive, and wait for it to be fully initialized and ready before trying to access it?</p>
  
  <p>Currently I am using Win32_CDROMDrive from the WMI. I check the 'MediaLoaded' and wait until it changes from 'false' to 'true'. This works 90% of the time, but every now and then, I get an error from the OS saying that it expected the previous volume (CD) to still be in the drive.</p>
  
  <p>Workflow:
         1. insert cd
         1.5 wait for 'MediaLoaded' flag
         2. process data
         3. eject cd
         4. start over.</p>
  
  <p>WinXP 32bit, c++</p>