Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results
The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.
Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/
Hi,
I am currently writing a minifilter to filter CD-Rom device. I am trying to get
notification of a media change so I can detect when a CD has been loaded/ejected.
Can anyone tell me how exactly to do to get the notification.
Thanks
Upcoming OSR Seminars | ||
---|---|---|
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead! | ||
Writing WDF Drivers | 12 September 2022 | Live, Online |
Internals & Software Drivers | 23 October 2022 | Live, Online |
Kernel Debugging | 14 November 2022 | Live, Online |
Developing Minifilters | 5 December 2022 | Live, Online |
Comments
Not sure what exactly you need but you can get this sort of information through device events (e.g. GUID_IO_MEDIA_ARRIVAL/GUID_IO_MEDIA_REMOVAL). You can register for these in kernel mode using IoRegisterPlugPlayNotification for EventCategoryTargetDeviceChange.
-scott
OSR
thanks @Scott_Noone_(OSR) I need monitor this because when user use a raw CD I can't get notify in instanceSetup when it replugin. So if I want block it I don't know it is a new CD or it is the old one.