Thread View: comp.lang.pascal.delphi.misc
3 messages
3 total messages
Started by Chow Hoi Ka, Eric
Mon, 24 May 1999 00:00
How tto eject CD-ROM ?
Author: Chow Hoi Ka, Eric
Date: Mon, 24 May 1999 00:00
Date: Mon, 24 May 1999 00:00
18 lines
1634 bytes
1634 bytes
Hello,
How can I eject or close the CD-ROM ???
Best regards,
Eric
--
_ _
/ ) |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ( \
/ / | | \ \
_( /_ | _ Chow Hoi Ka, Eric _ | _) )_
(((\ \> |/ ) ( \| </ /)))
(\\\\ \_/ / E-Mail : d951686@sftw.umac.mo \ \_/ ////)
\ / \ /
\ _/ http://www.sftw.umac.mo/~d951686/ \_ /
/ / |____________________________________________| \ \
/ / \ \
Re: How tto eject CD-ROM ?
Author: Dave Parsons
Date: Mon, 24 May 1999 00:00
Date: Mon, 24 May 1999 00:00
54 lines
2485 bytes
2485 bytes
Eric,
Take a look:
procedure CDOpenClose;
var
MCIO: TMCI_Open_Parms;
MCIS: TMCI_Status_Parms;
begin
MCIO.lpstrDeviceType := PChar(MCI_DEVTYPE_CD_AUDIO);
if mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE or MCI_OPEN_TYPE_ID or
MCI_OPEN_SHAREABLE, LongInt(@MCIO)) = 0 then
begin
MCIS.dwItem := MCI_STATUS_READY;
mciSendCommand(MCIO.wDeviceID, MCI_STATUS, MCI_STATUS_ITEM or MCI_WAIT,
LongInt(@MCIS));
if MCIS.dwReturn <> 0 then mciSendCommand(MCIO.wDeviceID, MCI_SET,
MCI_SET_DOOR_OPEN, 0)
else
mciSendCommand(MCIO.wDeviceID, MCI_SET, MCI_SET_DOOR_CLOSED, 0);
mciSendCommand(MCIO.wDeviceID, MCI_CLOSE, MCI_WAIT, 0);
end;
end;
--
Good Luck!!
-Dave
Inprise Certified Delphi 4 Client/Server developer
http://www.erols.com/dparsons
Chow Hoi Ka, Eric <d951686@sftw.umac.mo> wrote in message
news:37494F8D.1DACDF65@sftw.umac.mo...
> Hello,
>
> How can I eject or close the CD-ROM ???
>
>
> Best regards,
> Eric
> --
> _ _
> / ) |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ( \
> / / | | \ \
> _( /_ | _ Chow Hoi Ka, Eric _ | _) )_
> (((\ \> |/ ) ( \| </ /)))
> (\\\\ \_/ / E-Mail : d951686@sftw.umac.mo \ \_/ ////)
> \ / \ /
> \ _/ http://www.sftw.umac.mo/~d951686/ \_ /
> / / |____________________________________________| \ \
> / / \ \
>
>
Re: How tto eject CD-ROM ?
Author: Earl F. Glynn
Date: Mon, 24 May 1999 00:00
Date: Mon, 24 May 1999 00:00
15 lines
1415 bytes
1415 bytes
Chow Hoi Ka, Eric <d951686@sftw.umac.mo> wrote in message news:37494F8D.1DACDF65@sftw.umac.mo... > How can I eject or close the CD-ROM ??? There are several links about working with CD-ROMs in Delphi at http://www.efg2.com/lab/library/delphi/IO/DisksDrives.htm efg _________________________________ efg's Computer Lab: http://www.efg2.com/lab Delphi Books: http://www.efg2.com/lab/TechBooks/Delphi.htm Earl F. Glynn E-Mail: EarlGlynn@att.net Overland Park, KS USA
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads