The Windows autoplay feature functions differently depending on which version of Windows you are using. They are very similar between 2k and XP, and for this discussion I will assume most people are using XP. When a disc is inserted Windows fist tries to determine what kind of media it contains (CD Audio, DVD, Blank), it then checks the registry to determine how to handle the event (HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers)
, if a default application is specified it is launched otherwise a window will appear giving the user a list of options. Now in order for a program to act as an autoplay handler must implement the IHWEventHandler interface in a registered COM server.
I have started some work on creating a program to do this, but my progress has slowed due to other commitments. But here is what I came up with so far:
1. You would need to create a COM dll that was registered as an autoplay handler for the "PlayCDAudioOnArrival", "PlayDVDMovieOnArrival", and possibly "HandleCDBurningOnArrival" events.
2. Make this the default handler for all these events so no "What would you like to do window?" appears.
3. Then depending on which event was triggered send a sendmessage event to Xlobby
4. When the event is triggered in Xlobby an overlay screen could appear giving the user a choice either play or rip. The overlay screens could look identical, but you must have seperate screens so that the play / rip buttons can launch the appropriate external applications.
5. When the user makes their selection an external program is launched in the background to handle the request.
Currently I have overlay screens created on my system that work perfectly using EAC and Smartripper via the command line for ripping CDs and DVDs. The only thing I haven't got around to writing is the autoplay handler dll. Unfortunately I just don't have the time right now, but if anyone else is interested I would suggest looking at how some other programs like winamp and WMP9 look in the autoplay section of the registry (mentioned above), also here is a link to the MS article discussing how everything works:
http://msdn.microsoft.com/library/en-us ... _using.asp
As always if anyone has any other questions just ask
Bill