Can Upper Filter Detect Shutdown

Hi Folks / Gals,

Is it possible for a audio upper class filter driver to know that the
computer is being shut down?

My Purpose:
I was hoping to add a flag in the registry so I know if the computer
crashes (from my driver) and so not to reload the driver on next boot
so the system remains stable.
When I remove all audio cards from my audio driver the driver does
unload, but on reboot the unload event and the unplugging of the audio
cards does not happen. Thus leaving me wondering if I can add that
stability feature into the driver if anything goes very wrong (normally
doesn’t but I can’t check all everything everywhere in the big world.).
I am adding that “no load” registry setting because trying to get a
person to go into safe mode to uninstall a driver is a nightmare.

any ideas?

Cheers
Obble.

I know nothing about audio filters, but in general, this is one way that works no matter what type of device (though not necessarily exactly when you might want it to):

http://blogs.msdn.com/doronh/archive/2006/06/13/630493.aspx

Good luck,

mm

>Is it possible for a audio upper class filter driver to know that the computer is being shut down?

You could register your IRP_MJ_SHUTDOWN notification by calling IoRegisterShutdownNotification.

Igor Sharovar

Thank you Mobrien & Igor.

On 4/13/2010 8:53 AM, xxxxx@hotmail.com wrote:

> Is it possible for a audio upper class filter driver to know that the computer is being shut down?
>
You could register your IRP_MJ_SHUTDOWN notification by calling IoRegisterShutdownNotification.

Igor Sharovar


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Happy to help.

Good luck,

mm

> I was hoping to add a flag in the registry so I know if the computer

crashes (from my driver) and so not to reload the driver on next boot
so the system remains stable.

Instead of doing this, fix all crashes in your driver. This is simpler and will requre lesser further maintenance.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com

I agree!.

On 13/04/2010 9:17 AM, Maxim S. Shatskih wrote:

Instead of doing this, fix all crashes in your driver. This is simpler and will requre lesser further maintenance.