Archived

This topic is now archived and is closed to further replies.

v0id

How do you open the cd-rom in c++

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hmmm, is it just my browser, or does something in the sig of BlackJester make the formating of this thread look somewhat weird ?

Share this post


Link to post
Share on other sites
i always get this when i try to compile it:




--------------------Configuration: CDaudio - Win32 Debug--------------------
Compiling...
open.cpp
Linking...
Open.obj : error LNK2001: unresolved external symbol __imp__mciSendStringA@16
Debug/Open.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

Open.exe - 2 error(s), 0 warning(s)

Share this post


Link to post
Share on other sites
Either include winmm.lib in your project, or (if using MSVC) use
#pragma comment(lib,"winmm.lib")


"If people are good only because they fear punishment and hope for reward, then we are a sorry lot indeed." - Albert Einstein

Share this post


Link to post
Share on other sites