Solved

Closing CD-ROM tray

Posted on 1999-01-07
7
206 Views
Last Modified: 2010-04-04
How can I close CD-ROM tray, I mean the oposite method for Eject.
I use TMediaPlayer

Motaz
0
Comment
Question by:Motaz
  • 4
  • 3
7 Comments
 
LVL 8

Accepted Solution

by:
ZifNab earned 10 total points
ID: 1355112
To close the CD-ROM:

       mciSendString('Set cdaudio door closed wait', nil, 0, handle);

OR

procedure TCDEvents.CloseDoor;
var
  SetParm: TMCI_Set_Parms;
begin
  FFlags := 0;
  FFlags := mci_notify or mci_set_door_closed;
  SetParm.dwCallback := 0;
  fErrCode := mciSendCommand( ID, mci_Set, FFlags, Longint(@SetParm) );
end;

You can get the ID from Mediaplayer.
0
 
LVL 7

Author Comment

by:Motaz
ID: 1355113
Thanks Tom
Motaz
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1355114
Glad I could help you Motaz.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 7

Author Comment

by:Motaz
ID: 1355115
by the way ZiffNap, what is your real name, where r u from and where is experts-exchange, is it in USA in which state ?
 :)

Motaz
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1355116
Hi,

Hi Motaz, my real name is Tom (thought you knew it already) and I'm from Belgium (I think you can see it also at my info (click on ZifNab).

E-E? Guess in USA. (Experts Exchange, Inc.;   406 Higuera Street, Suite 120; San Luis Obispo, CA 93401)

ID of cd can be found through mediaplayer1.DeviceID

Zif.
0
 
LVL 7

Author Comment

by:Motaz
ID: 1355117
Thanks Tom, nice to meet you
Motaz Abdel Azim from Sudan
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1355118
Nice to meet you too Motaz Abdel Azim.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now