Aug-17-2021, 03:58 AM
(Aug-16-2021, 08:50 PM)deanhystad Wrote: Is the DVD going to show up as D: or does it show up in D:? If it shows up as D: I don't think you can use watchdog to see when a DVD is installed. Sure, you can keep trying to start the observer and it will fail until a DVD is installed, but you get the same info trying to read the D:\\ folder.
In a windows program you would use the RegisterDeviceNotification call. I don't know of any python wrapper library for this system call.
So Python does have ways to access dll functions with ctypes. I may just make a wrapper myself but will see. I might even write this trigger in C or C++ just to learn these languages. I do know I'm going to need a lot more research before I figure this one out.