I need Python code to implement Windows Volume Autoplay Cancellation. The code should: * Register a function to receive QueryCancelAutoPlay. * Receive the Windows message indicating that new media has been inserted to a CD drive. Identify that this is the correct function (according to the message registration) and get the drive letter into which the media has been inserted. * Reply to the message so that autoplay is cancelled. An overview of this procedure is described in: [url removed, login to view] A simple example in Delphi can be found in: [url removed, login to view] Basically, I need the same work done in Python, which I will be able to integrate into my Python code (using Python Windows 32 extension).
1) Complete and fully-functional working program(s) in Python code. 2) Deliverables must be in ready-to-run condition, as follows: Integrated into a simple stand-alone Python program which prints out the drive letter into which the CD has been inserted and cancels the autorun procedure Windows (no message displayed when new media is inserted into a drive).
Runs on Python 2.4, Windows 98,Me,2000,XP. May use standard Python Windows 32 extensions.