cdtray.dll 1.1 - CD tray eject/close/toggle bangs
-----------------------------------------------------------

Bangs:

!CDTrayEject
!CDTrayClose
!CDTrayToggle


-----------------------------------------------------------
History:

1.1 
  * Improved mechanism of !CDTrayToggle (see note below)
1.0
  * Initial release. Tested on Win98.


-----------------------------------------------------------
Example usage:

Load module in step.rc 

	LoadModule c:\litestep\cdtray.dll

Bind Bangs to hotkeys

	; Eject/Close CD tray 
	*Hotkey Ctrl+Alt backspace !CDTrayToggle

-----------------------------------------------------------
Notes:

!CDTrayToggle is little bit tricky function. It is somewhat 
difficult to determine current state of CD tray 
(opened/closed) because WinAPI reporting "open" state when
no CD is inserted, no matter of "physical" tray state. 

So, toggle mechanism is as follows:
	
State reported:     It means that:                 Action taken:
-------------------------------------------------------------------------------
Other than 'open'   CD is in                       Eject tray
'open'              Tray opened / Closed & no CD   Toggle Eject/Close, based on 
                                                   previous remembered state

Right this 'remembered state' flag is tricky because when
you eject/close CD manually, it is not synchronized with
internal state-flag and !CDTrayToggle will fail to 
eject/close tray at the first time.
Repeated !CDTrayToggle will do correct action.

-----------------------------------------------------------
mailto: pavel.vitis@seznam.cz
www   : http://floach.pimpin.net/pavel/
