How to detect cdrom drive...

M

M

I searched the FAQ for this NG and found no answers to my question...

I'm writing an application in Java (I'm not a C programmer), however I
need to be able to detect WHICH drive (d:\, e:\ etc...) on a win2k
machine the CDROM drive is on. I assume that C or C++ can do this. The
C/C++ code will then be wrapped in a JNI layer to be used by the java
code.

Basically, all I want the C code to do is return a letter
corresponding to the drive the CDROM is on. Is there any code
available that does this?

thanks,
 
C

Christopher Benson-Manica

M said:
I searched the FAQ for this NG and found no answers to my question...

How about the welcome message?

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html
I'm writing an application in Java (I'm not a C programmer), however I
need to be able to detect WHICH drive (d:\, e:\ etc...) on a win2k
machine the CDROM drive is on. I assume that C or C++ can do this. The
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Not without extensions specific to your system, which are not
discussed on this newsgroup.
 
A

Allan Bruce

M said:
I searched the FAQ for this NG and found no answers to my question...

I'm writing an application in Java (I'm not a C programmer), however I
need to be able to detect WHICH drive (d:\, e:\ etc...) on a win2k
machine the CDROM drive is on. I assume that C or C++ can do this. The
C/C++ code will then be wrapped in a JNI layer to be used by the java
code.

Basically, all I want the C code to do is return a letter
corresponding to the drive the CDROM is on. Is there any code
available that does this?

thanks,

Maybe if you do something like this:

#include "stdio"

void main (void)
{
char *pathToCD;
if (pathToCD)
readFromCD(pathToCD);
}

snigger...
 
M

Madhur Ahuja

Your question is off topic.
Please ask in:
comp.lang.java.programmer
comp.lant.java.help
comp.os.ms-windows.programmer.win32

--
Winners dont do different things, they do things differently.

Madhur Ahuja
India

Homepage : http://madhur.netfirms.com
Email : madhur<underscore>ahuja<at>yahoo<dot>com
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top