How do you open the cd-rom in c++
In what way ? do you just want to open files, in which case the standard methods (fopen, CreateFileEx etc.) will work fine - or do you want to be able to read the raw data - block by block - like a MP3 ripper ? - in that case try searching for AKRIP - I can''t remember the address - I think it may be on source forge - but anyhow it''s an open source program that uses WNASPI to access the CD & read the raw data - I think it''s also got some ASPI tuts
If you''re trying to eject the cd-rom, then it''s not too hard:
#include <mmsystem.h>
mciSendString("set cdaudio door open", NULL, 0, NULL);
#include <mmsystem.h>
mciSendString("set cdaudio door open", NULL, 0, NULL);
You mean like a Trojan?? *tsk tsk*
"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
"I''ve learned something today: It doesn''t matter if you''re white, or if you''re black...the only color that REALLY matters is green"
-Peter Griffin
if you are using the Dev-C++ compiler, use this
mciSendString("set cdaudio door open", NULL, 0, NULL);
you can also set the door to close using closed as your option instead of open
p.s.Thanks for this(did not know about it yet in my young programming lifetime)...I got my mother and daughter both with this thinking that they had ran a bug or virus...heehe...
mciSendString("set cdaudio door open", NULL, 0, NULL);
you can also set the door to close using closed as your option instead of open
p.s.Thanks for this(did not know about it yet in my young programming lifetime)...I got my mother and daughter both with this thinking that they had ran a bug or virus...heehe...
if you are using the Dev-C++ compiler, use this
mciSendStringA("set cdaudio door open", NULL, 0, NULL);
forgot this one up above...the ''A''..sorry for the double-post!
you can also set the door to close using closed as your option instead of open
p.s.Thanks for this(did not know about it yet in my young programming lifetime)...I got my mother and daughter both with this thinking that they had ran a bug or virus...heehe...
mciSendStringA("set cdaudio door open", NULL, 0, NULL);
forgot this one up above...the ''A''..sorry for the double-post!
you can also set the door to close using closed as your option instead of open
p.s.Thanks for this(did not know about it yet in my young programming lifetime)...I got my mother and daughter both with this thinking that they had ran a bug or virus...heehe...
Hmmm, is it just my browser, or does something in the sig of BlackJester make the formating of this thread look somewhat weird ?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement