Code for ejecting the CD-drive.

P

priyasmita_guha

Can anyone give me the code in C for ejecting the CD-drive ?
Thanks in advance!
 
V

Vladimir S. Oka

Can anyone give me the code in C for ejecting the CD-drive ?
Thanks in advance!

Yes, but not here. Ask in a group that discusses your particular OS.
 
W

W Marsh

Can anyone give me the code in C for ejecting the CD-drive ?
Thanks in advance!

C can't do this, you need C++ (which was in fact designed around this
specific purpose). Check any standard graduate text for CD ejecting
theory and research outcomes.
 
J

Juuso Hukkanen

Can anyone give me the code in C for ejecting the CD-drive ?
Thanks in advance!

<OT>

int main(void)
{
t3d_open_CD_TRAY();
return(0);
}


/* unfortunately the contents of particular t3d function do not yet
exist. If it did the function could also have been called using
atleast folllowing alias names:
- t3d_environment_OPEN_n_CD_DRIVE
- t3d_environment_EJECT_n_CD_DRIVE
- t3d_environment_EJECT_CD();
- t3d_avaa_CD_ASEMA(); //Finnish example
- t3d_öppna_CD_LUCKAN //Swedish example
- t3d_remove_CD_DISC


http://www.tele3d.com/t3d/language.pdf

t3d programming language and the structure of t3d function prototype
are now trademarks of Juuso Hukkanen. ( TM's will be donated to
charity.)


If OP can't wait, google: stdio.h "eject cd"


*/
<OT>

Juuso
 
K

Kenneth Brody

Can anyone give me the code in C for ejecting the CD-drive ?
Thanks in advance!

My DS-6000 will do it with:

i = i++;

However, this doesn't work on my DS-6100.

Your system may require something else entirely.

--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:[email protected]>
 
P

Pedro Graca

Can anyone give me the code in C for ejecting the CD-drive ?
Thanks in advance!

#include <stdio.h>
int main(void) {
printf("Please press the CD eject button on the cd-player\n"
"Press <ENTER> when you're done.\n");
getchar();
printf("The CD drive has been ejected.\n");
return 0;
}
 
K

Kenneth Brody

Rod said:
Sure. The following code shows how to do a raw CD player for DOS.
http://my.execpc.com/CE/AC/geezer/software/
"play audio CD without MSCDEX"
http://my.execpc.com/CE/AC/geezer/software/cdplay.c

You didn't say Linux or Windows... Besides, it shows you _everything_
you'll ever need to program a CD player.

My DS-6000 doesn't run DOS, Linux, or Windows. Nor does it have anything
called "ATAPI", or "Interrupt 19".

--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:[email protected]>
 
B

Ben Pfaff

Kenneth Brody said:
My DS-6000 doesn't run DOS, Linux, or Windows. Nor does it have anything
called "ATAPI", or "Interrupt 19".

You should really upgrade to the DS 9000. The 6000 is ancient
history these days.
 
J

Jack Klein

C can't do this, you need C++ (which was in fact designed around this
specific purpose). Check any standard graduate text for CD ejecting
theory and research outcomes.

What complete and utter nonsense!

C++ cannot eject CD drives. It can only eject C++D drives!
 
V

Vladimir S. Oka

Jack Klein opined:
What complete and utter nonsense!

C++ cannot eject CD drives. It can only eject C++D drives!

I always thought that was C++Drives. Live and learn, I say...
 
K

Kenneth Brody

Ben said:
You should really upgrade to the DS 9000. The 6000 is ancient
history these days.

But I've heard that I would need to change all of my "a = i++" statements
to "a[i++] = i" to keep them working.

--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:[email protected]>
 
P

Pedro Graca

Kenneth said:
Ben said:
You should really upgrade to the DS 9000. The 6000 is ancient
history these days.

But I've heard that I would need to change all of my "a = i++" statements
to "a[i++] = i" to keep them working.


I don't know the DS 9000 (or 6000) but you surely want to change all of
your "a = i++" statements to "(++i)[a] = i" to take advantage of pre
increment *and* pre indexing :) <== smiley noting I'm only joking
 
V

Vladimir S. Oka

Pedro Graca opined:
Kenneth said:
Ben said:
You should really upgrade to the DS 9000. The 6000 is ancient
history these days.

But I've heard that I would need to change all of my "a = i++"
statements to "a[i++] = i" to keep them working.


I don't know the DS 9000 (or 6000) but you surely want to change all
of your "a = i++" statements to "(++i)[a] = i" to take advantage
of pre
increment *and* pre indexing :) <== smiley noting I'm only joking


One *never* jokes in the same breath one mentions DS9K (or 6K).
 
P

Pedro Graca

Vladimir said:
Pedro Graca opined:
Kenneth said:
Ben Pfaff wrote:
You should really upgrade to the DS 9000. The 6000 is ancient
history these days.

But I've heard that I would need to change all of my "a = i++"
statements to "a[i++] = i" to keep them working.


I don't know the DS 9000 (or 6000) but you surely want to change all
of your "a = i++" statements to "(++i)[a] = i" to take advantage
of pre
increment *and* pre indexing :) <== smiley noting I'm only joking


One *never* jokes in the same breath one mentions DS9K (or 6K).


Oops, I've even resorted to Google Groups to atone for my sin.
 
P

Pedro Graca

Pedro said:
I don't know the DS 9000 (or 6000)

This was a tough one to find
but worth every minute once I found it :)


[ the void's and comment delimiters are mine ]

/* Commence Launch (Remote Systems Console Request) */
void clrscr(void);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,947
Members
47,498
Latest member
log5Sshell/alfa5

Latest Threads

Top