Article View: borland.public.cppbuilder.nativeapi
Article #302Re: How to eject CD tray
From: Colin B Maharaj
Date: Wed, 04 Jun 2008 10:54
Date: Wed, 04 Jun 2008 10:54
34 lines
2031 bytes
2031 bytes
Interesting question, however I installed an application
by a customer recently and the setup program had an option
to eject the CD.
The Customer has 2 CD drives and the eject process ejected
the other closed CD ROM drive (heh heh) :)
Question: How to tell which drive you are in and relate it
the the drive you are ejecting...
Jason Cipriani wrote:
> "Christophe Minetti" <cminetti@ulb.ac.be> wrote in message
> news:48450FE9.6260731F@ulb.ac.be...
>> What is the command to eject the CD-Rom tray ?
>
> You want mciSendString:
>
> http://msdn.microsoft.com/en-us/library/ms709492(VS.85).aspx
>
> Use the "set" command:
>
> http://msdn.microsoft.com/en-us/library/ms709492(VS.85).aspx
>
> Example:
>
> #include <mmsystem.h>
> void __fastcall TForm2::Button1Click(TObject *Sender) {
> mciSendString("set cdaudio door open", NULL, 0, NULL);
> }
>
> Jason
>
>
Technical Details
Message-ID:
<4846745f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<48450FE9.6260731F@ulb.ac.be> <48455251@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2231c67b2a0d974 X-Google-Attributes: gid10cc67,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 04 Jun 2008 06:54:22 -0400 From: Colin B Maharaj <noreply@myhost.com> User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: How to eject CD tray References: <48450FE9.6260731F@ulb.ac.be> <48455251@newsgroups.borland.com> In-Reply-To: <48455251@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080604-1, 06/04/2008), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 190.58.48.43 Message-ID: <4846745f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1212576863 190.58.48.43 (4 Jun 2008 03:54:23 -0700) Lines: 34 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail X-Original-Bytes: 1802