It is really not practical to try and caputue failures in minifilters and unload them. It simply masks bugs in drivers and can lead to other strange things. FOr example if someone had an encryption filter that crashed and was automatically unloaded you
as a user might wonder why you can no longer access your encrypted data. There is no way to handle all of this generically
It is better to provide tools such that 3rd party developers can create quality drivers that don't have crashing bugs. One of the things we are working on for longhorn is a comprehensive driver verifier for minifilters like we have for other drivers in the
As far as C# goes in the kernel, you should talk to the device driver guys; they are thinking about this for the future.
You have to have administrator privilege to unload a minifilter.
The developers of minifilters can decide if they want to support unload (we encourage it due to JimAl's "no reboot" initiative). They can also do additional authentication themselves to make sure a minifilter is being unloaded by someone appropriate.