Link to home
Start Free TrialLog in
Avatar of cvidler
cvidler

asked on

CD-ROM Tray Locking

I know how to programmatically open/close the CD-ROM tray, but I need to be able to lock/unlock the tray - prevent it from opening by pressing the button.

Avatar of vbyuval
vbyuval

I wish I knew !
Avatar of cvidler

ASKER

I hope you just clicked the 'Answer' option by accident...
How bout this,

Place a timer on the form
set the interval to 1
have it send the MCISENDSTRING "CLOSE" to the cdrom at each interval.  therefore if the user presses the open button on the cdrom at the next millisecond the cdrom will close.

GoOd LuCk!

Lee
Avatar of cvidler

ASKER

Unfortuanetly this is what I have treid before, and the constant accessing slows down the programs that need the CD drive far too much.

No I know how to open/close the tray using MCI

"set cdaudio door open"
or
"set cdaudio door closed"

is there are "door locked/unlocked"???
ASKER CERTIFIED SOLUTION
Avatar of mcrider
mcrider

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cvidler

ASKER

I'll give it a try - but I know their is a better way - how do those little DOS utils work (because they don't stay TSR)

there is also a prog called WinEject which will do it for you...