Mirror

Eject and close CD-Drive (Views: 102)


Problem/Question/Abstract:

Eject and close CD-Drive

Answer:

These two function calls open and close the CD tray.
Because the command "wait" is included in the command string, the function returns after the command has been executed:


uses
  MMSystem;

{ open the CD tray }
mciSendString('Set cdaudio door open wait', nil, 0, 0);

{ close the CD tray }
mciSendString('Set cdaudio door closed wait', nil, 0, 0);

<< Back to main page