1 2 3 4 5 6 7 8 9 10 11
| //Utilisation des MCI (Media Control Interface)
AnsiString Lecteur ="D:\\";
AnsiString Mes = "open " + Lecteur + " type cdaudio alias cdaudio";
mciSendString(Mes.c_str(), 0, 0, 0); //on cree l'association
mciSendString("Set cdaudio door open wait", 0, 0, 0); //on ouvre le tiroir
ShowMessage("Attention : surtout ne touchez pas au lecteur : cliquez sur OK : exécution automatique, vous pourrez ensuite choisir le logiciel de lecture DVD");
mciSendString("Set cdaudio door closed wait", 0, 0, 0); //on ferme le tiroir
mciSendString("close cdaudio", 0, 0, 0); //on cloture l'association |