Chat on IRC |
CDROMs and Java
Posted by vikram_1982 [send private reply] at April 02, 2002, 01:09:39 AM
Plz give me a Java code to open and close the Cdrom drive.
I tried the following VB code, but it aint working, will u b able to figure out why!! Uses MMSystem Open CDROM Drive mciSendString('Set cdaudio door open', nil, 0, handle); Close CDROM Drive mciSendString('Set cdaudio door closed', nil, 0, handle);
Posted by taubz [send private reply] at April 02, 2002, 01:20:31 AM
Plz don't ask us to write code for you.
However, the answer is that it cannot be done in Java. As for the VB code, the easiest way to find out why your code doesn't work is to look up the function mciSendString in the MSDN, http://msdn.microsoft.com/library. If what you want to do can be done, it should be documented properly there, or linked from there. The specific MCI commands are very... idiosyncratic. - taubz
Posted by vikram_1982 [send private reply] at April 02, 2002, 01:23:35 AM
Thanks taubz
Posted by AnyoneEB [send private reply] at May 07, 2002, 08:06:54 PM
You can do it in ASM, and if you make your Java program call ASM, you can do it that way.
Posted by vikram_1982 [send private reply] at May 07, 2002, 10:07:39 PM
Could u plz explain how.
Posted by AnyoneEB [send private reply] at May 08, 2002, 03:30:30 PM
I don't know how to do the ASM code, but there something on the website saying there's a way to hava Java call C++ or ASM. http://java.sun.com/ I think it was JRI or something like that.
Posted by vikram_1982 [send private reply] at May 08, 2002, 09:46:52 PM
Thank You.
Posted by taubz [send private reply] at May 08, 2002, 10:00:50 PM
JNI
Posted by AnyoneEB [send private reply] at May 12, 2002, 07:43:25 PM
'J' something 'I' close enough :)
tx, taubz
Posted by vikram_1982 [send private reply] at May 13, 2002, 09:58:21 AM
eh??
Posted by AnyoneEB [send private reply] at May 13, 2002, 02:13:31 PM
Nevermind, it was supposed to be a joke. Taubz told you what you wanted to know.
Register as a new user | |||||||||||||