I'm going to look at that. Thanks a lot for your time.
MCI: MCI_CLOSE needed if the CD has been ejected?
David L
161
Reputation points
Hello
I have read that sending MCI_CLOSE command is important to get access again to the device later on.
If I handle the CD player opening message DBT_DEVICEREMOVECOMPLETE, check that this is the right player (in case there are several ones) and then try to send the "mciSendCommandW(deviceID, MCI_CLOSE, MCI_WAIT, (DWORD_PTR)&mgp);" (deviceID is the same than the one I used successfully for MCI_PLAY), I get a "0xC0000008: An invalid handle was specified" exception.
Does the ejection close the device on its own before sending DBT_DEVICEREMOVECOMPLETE ?
Thanks
David