473,473 Members | 1,906 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Code for ejecting the CD-drive.

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

Mar 17 '06 #1
15 8606
On 17 Mar 2006 08:08:21 -0800, "pr*************@yahoo.co.in"
<pr*************@yahoo.co.in> wrote:
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.
Mar 17 '06 #2
On Friday 17 March 2006 16:08, pr*************@yahoo.co.in opined (in
<11*********************@p10g2000cwp.googlegroups. com>):
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.

--
BR, Vladimir

C'est magnifique, mais ce n'est pas l'Informatique.
-- Bosquet [on seeing the IBM 4341]

Mar 17 '06 #3
On 17 Mar 2006 08:08:21 -0800, "pr*************@yahoo.co.in"
<pr*************@yahoo.co.in> wrote:
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

Mar 17 '06 #4
"pr*************@yahoo.co.in" wrote:

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:Th*************@gmail.com>

Mar 17 '06 #5
pr*************@yahoo.co.in wrote:
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;
}

--
If you're posting through Google read <http://cfaj.freeshell.org/google>
Mar 17 '06 #6

<pr*************@yahoo.co.in> wrote in message
news:11*********************@p10g2000cwp.googlegro ups.com...
Can anyone give me the code in C for ejecting the CD-drive ?
Thanks in advance!


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.
Rod Pemberton
Mar 17 '06 #7
Rod Pemberton wrote:

<pr*************@yahoo.co.in> wrote in message
news:11*********************@p10g2000cwp.googlegro ups.com...
Can anyone give me the code in C for ejecting the CD-drive ?
Thanks in advance!


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:Th*************@gmail.com>

Mar 18 '06 #8
Kenneth Brody <ke******@spamcop.net> writes:
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.
--
"We put [the best] Assembler programmers in a little glass case in the hallway
near the Exit sign. The sign on the case says, `In case of optimization
problem, break glass.' Meanwhile, the problem solvers are busy doing their
work in languages most appropriate to the job at hand." --Richard Riehle
Mar 18 '06 #9
On Fri, 17 Mar 2006 16:13:34 +0000, W Marsh <wa*********@gmail.com>
wrote in comp.lang.c:
On 17 Mar 2006 08:08:21 -0800, "pr*************@yahoo.co.in"
<pr*************@yahoo.co.in> wrote:
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.


What complete and utter nonsense!

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

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Mar 18 '06 #10
Jack Klein opined:
On Fri, 17 Mar 2006 16:13:34 +0000, W Marsh <wa*********@gmail.com>
wrote in comp.lang.c:
On 17 Mar 2006 08:08:21 -0800, "pr*************@yahoo.co.in"
<pr*************@yahoo.co.in> wrote:
>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.


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...

--
BR, Vladimir

I once decorated my apartment entirely in ten foot salad forks!!

Mar 18 '06 #11
Ben Pfaff wrote:

Kenneth Brody <ke******@spamcop.net> writes:
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.


But I've heard that I would need to change all of my "a[i] = 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:Th*************@gmail.com>
Mar 20 '06 #12
Kenneth Brody wrote:
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] = 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] = i++" statements to "(++i)[a] = i" to take advantage of pre
increment *and* pre indexing :) <== smiley noting I'm only joking

--
If you're posting through Google read <http://cfaj.freeshell.org/google>
Mar 20 '06 #13
Pedro Graca opined:
Kenneth Brody wrote:
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] = 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] = 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).

--
BR, Vladimir

An acid is like a woman: a good one will eat through your pants.
-- Mel Gibson, Saturday Night Live

Mar 20 '06 #14
Vladimir S. Oka wrote:
Pedro Graca opined:
Kenneth Brody wrote:
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] = 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] = 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.

Mar 20 '06 #15
Pedro Graca wrote:
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);
--
If you're posting through Google read <http://cfaj.freeshell.org/google>
Mar 21 '06 #16

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Roy Riddex | last post by:
Hi I'm wanting to create a cd-rom which boots automatically when it's inserted into the computer. What I hope to achieve is for a VB6 program to run automatically when the cd boots up. Can this...
2
by: chichi | last post by:
Hi there! I was wondering if somebody could tell me how to edit the following ASP code so that the text within the tables appears as Font Color "00FF00". Right now it is appearing in BLACK and...
4
by: DBNovice | last post by:
I have a database that keeps records on the issue and failure of an item. Currently, the database is poorly desisned; therefore I'm performing queries to break the data into normalized tables and...
5
by: Paddy | last post by:
Is it possible to send (char)12 to the printer to make it eject? If so, how can that be done? If not, how can a page be ejected differently? Many thanks.
1
by: Barkha Shah | last post by:
Hi All, I am looking for a tool/utility that converts the address into source code line. Purpose is that I have written a basic mfc application that purposely has a memory leak.Now at the exit...
0
by: Joe Cool | last post by:
I have some shareware CD/DVD burning software that has a command line interface, perfect for writing you own CD/DVD custom burning software. I have an app that burns a few DVDs. Recently I have had...
2
by: zacks | last post by:
I use some shareware CD/DVD burning software that has a command line interface version. This allowed me to write my own custom SDK that performs various CD/DVD burning operations from my own VB.NET...
1
by: anilkumarkp | last post by:
Hai I have to print a receipt in pre-printer stationary with bar code, My paper size is 4", i have set the paers size as Printer.ScaleMode = 1 ' vbTwips Printer.Height = 4 * 1440...
0
by: SM | last post by:
Hello, I have a xml file that contains the CD library of one artist. I want to extract all the tracks from a specific CD. I was able to extract the title of all the cd's but not the tracks of one...
3
by: whitep8 | last post by:
Hi all, Im very new to java and getting there slowly. Im working on basic class functions. Im totally fine with get and set, storing objects into an array and recalling them, but im totally...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.