Board index » delphi » open cd-tray

open cd-tray

hi,

anybody know the code to open the CD-tray of an atapi cd-rom ?

Thanks

Alex
--
remove .nospam f you reply by e-mail
--
The Motherboard Monitor:
http://www.euronet.nl/users/darkside/mbmonitor/
--

 

Re:open cd-tray


In article <6dh7hm$...@news3.euro.net>, "Alex van Kaam"

Quote
<darks...@euronet.nl.nospam> writes:
>anybody know the code to open the CD-tray of an atapi cd-rom ?

uses
mmSystem

{Eject the tray}

mciSendString('open cdaudio shareable', nil, 0, 0);
mciSendString('set cdaudio door open', nil, 0, 0);
mciSendString('close cdaudio', nil, 0, 0);

{Close the tray}

mciSendString('open cdaudio shareable', nil, 0, 0);
mciSendString('set cdaudio door closed', nil, 0, 0);
mciSendString('close cdaudio', nil, 0, 0);

Look in Delphi 1 MMSystem help selecting Search | Index, enter "open", select
display, then "open (CD audio)", display, and navigate back & forward with <<
and >> buttons to get the full mciSendString syntax.

Alan Lloyd
alangll...@aol.com.

Other Threads