From: Abel Munoz Alcaraz [abelm@ctv.es] Sent: Wednesday, January 10, 2001 4:07 PM To: NT Developers Interest List Subject: [ntdev] RE: Media Change Notification Hi Phil, NTSTATUS IoRegisterFsRegistrationChange( IN PDRIVER_OBJECT DriverObject, IN PDRIVER_FS_NOTIFICATION DriverNotificationRoutine ); Good luck, Abel Munoz Software Engineer Trymedia Systems -----Mensaje original----- De: bounce-ntdev-3489@lists.osr.com [mailto:bounce-ntdev-3489@lists.osr.com]En nombre de Phillip Burr Enviado el: lunes, 08 de enero de 2001 23:05 Para: NT Developers Interest List Asunto: [ntdev] Media Change Notification This may be any easy question for some but I'm still quite new to this... I'm trying to write a filter CD-ROM driver to do some special CD filtering. I need to maintain some state information about the CD and I need to invalidate it when the media changes. I've looked through \src\storage\class\classpnp\autorun.c and I've come to the conclusion that the easiest way would probably be use IoRegisterPlugPlayNotification since autorun very conveniently uses IoReportTargetDeviceChangeAsynchronous when a media change even occurs. My problem is with IoRegisterPlugPlayNotification. For EventCategoryTargetDeviceChange, IoRegisterPlugPlayNotification requires that EventCategoryData be filled with the File Object (PFILE_OBJECT) of the device for which I want notification. How do I get the File Object of the device that I'm filtering? I have found that I can use IoGetDeviceObjectPointer to get the File Object of a device that has registered a name. I know that this is true for CD-Rom devices (\device\cdromX). So, going this route, how would I get the name of the device I'm filtering? Is there an easier way? Thanks in advance! Phil Phillip Burr Development Department PowerQuest Corporation Phillip.Burr@powerquest.com (801)437-8317 --- You are currently subscribed to ntdev as: abelm@ctv.es To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com --- You are currently subscribed to ntdev as: GlennEverhart@FirstUSA.com To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com