DelphiFAQ Home Search:

Eject and close CD-Drive

 

comments5 comments. Current rating: 3 stars (1 votes). Leave comments and/ or rate it.

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);

Comments:

2006-02-01, 14:35:22
sosingus@yahoo.com  
This works only when there is only one audio device otherwise no.
2006-02-01, 14:37:26
sosingus@yahoo.com  
rating
This works only when there is only one audio device otherwise no.
2008-01-13, 03:51:33
ASM.Anuradha@gmail.com from Sri Lanka  
Thank u very much
2008-05-02, 23:01:45
anonymous from India  
thanks boss
2008-09-07, 10:08:46
anonymous  
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);

 

 

NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.
 

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: