How do i lock a cd inside the cd-drive, so that you can't open it by pressing the eject button.
Printable View
How do i lock a cd inside the cd-drive, so that you can't open it by pressing the eject button.
unfortunately, you can try it however,
most cd-roms have a very small pin hole
right under the tray...
this is used in the likely event if
a programmer has written a program that
locks a cd in the cd-rom in this manner
to retrieve the cd:
straighten out a small paperclip and insert
it into this hole and Voila!!
Out pops the tray....
will wonders never cease?
Use Super Glue... :D
You could do it through a timer, of course, it would open, but then close right away.
Code:Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal _
lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength _
As Long, ByVal hwndCallback As Long) As Long
Private Sub Timer1_Timer()
Dim lngReturn As Long
Dim strReturn As Long
lngReturn = mciSendString("set CDAudio door closed", strReturn, 127, 0)
DoEvents
End Sub
hum....i think that the guy want to know how to lock it like when u burn a cd u can't open the drive, im not sure if you can do that with a normal cd drive but anywayz hopefully some1 will be able to help ya
Why would you want to lock the CD drive???
Are you trying to write some sort of program to piss people off? Or you trying to mess up you schools computer drives?
hum...yah got a point there, it can be usefull for burning software because if u open the drive u'll srew everything up but i don't see anything else yah could do with that....
I'm not sure that would work for the CD-ROMs that have no trays.
You won't be able to lock it with vb code. You very well might be able to make it work in assembly though.
Hmm wow this is now a very old thread!
... but if anybody is interested I asked this question just recently and I did come up with some sort of solution. I have some C code that will do it but I only have the code to do it in WinNT/2k/XP. It could be made into a DLL to use in VB or translated into VB. I'm not to sure yet which would be the most practical I haven't really looked at it in great detail. I am quite certain that this command works on CD Read Only drive as well! Anyway if anyones interested email me...