🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.borland-delphi
Article #656

Re: Working with CdPlayer??

#656
From: Nicolay Samoilov
Date: Fri, 14 Jul 2000 00:00
34 lines
1784 bytes
Coleta <AMENDEZRA@nexo.es> wrote in message
news:8klfdg$m1p$1@talia.mad.ttd.net...
>     Hello to all.
>
>     I�m trying to open and close my Cdplayer by software. To Open is easy
:
> Mediaplayer1.eject; That�s all,
> but,  How close my cd???
>
>     Anybody can help me??
>
>     Thanks in Advance. SALU2 D Coleta.
>
>
procedure CloseCD(Drive : char);
var
  mp : TMediaPlayer;
begin
  Application.ProcessMessages;
  mp := TMediaPlayer.Create(nil);
  mp.Visible := false;
  mp.Parent := Application.MainForm;
  mp.Shareable := true;
  mp.DeviceType := dtCDAudio;
  mp.FileName := Drive + ':';
  mp.Open;
  Application.ProcessMessages;
  mciSendCommand(mp.DeviceID,
  MCI_SET, MCI_SET_DOOR_CLOSED, 0);
  Application.ProcessMessages;
  mp.Close;
  mp.free;
end;
Technical Details
Message-ID: <8kn7nk$csa$1@skynet.kharkov.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <8klfdg$m1p$1@talia.mad.ttd.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 1091e5,5bf3f85c4ccebb2f
X-Google-Attributes: gid1091e5,public
X-Google-Thread: 109d99,5bf3f85c4ccebb2f
X-Google-Attributes: gid109d99,public
X-Google-Thread: 105ac8,5bf3f85c4ccebb2f
X-Google-Attributes: gid105ac8,public
X-Google-Thread: 10545b,5bf3f85c4ccebb2f
X-Google-Attributes: gid10545b,public
From: "Nicolay Samoilov" <nic@ukr.net>
Subject: Re: Working with CdPlayer??
Date: 2000/07/14
Message-ID: <8kn7nk$csa$1@skynet.kharkov.com>
X-Deja-AN: 646570718
References: <8klfdg$m1p$1@talia.mad.ttd.net>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: news@skynet.kharkov.com
X-Trace: 15 Jul 2000 06:04:00 +0300, public1.ktts.kharkov.ua
Organization: Skynet news gate
X-MSMail-Priority: Normal
NNTP-Posting-Date: 14 Jul 2000 14:22:44 GMT
Newsgroups: alt.comp.borland-delphi,borland.public.delphi.ide,borland.public.delphi.winapi,comp.lang.pascal.delphi.components.misc