|Microsoft Internet Security and Acceleration Server 2000|
Begins the shutdown sequence for the filter object when the Firewall service is shutting down.
Any error should be handled in this method.
When shutting down the filter, the Firewall service releases references to all filter-implemented objects, after first making calls to the Detach method where applicable (either IFWXSessionFilter::Detach or IFWXDataFilter::Detach). However, because of the asynchronous nature of the proxy, the order of calling Detach/IFWXFilter::FilterShutdown is undefined, and the Firewall service may call the Detach method after IFWXFilter::FilterShutdown is returned. When the Firewall service calls Detach after IFWXFilter::FilterShutdown has been returned, filter-implemented objects may still be in the process of shutting down. Typically, the shutdown of filter-implemented objects does not have to be considered in filter design because the shutdown of objects occurs in the context of proxy worker threads. When the service stops, the Firewall service waits until all its worker threads have terminated and the shutdown operations have completed.
However, if the filter is doing shutdown work in a context other than a proxy worker thread — for example, a remote procedure call (RPC) worker thread or a timer callback thread — the nonproxy thread may execute code after all proxy worker threads have ended. Thus, the nonproxy thread will not have an appropriate context in which to execute the code. To avoid this situation, FilterShutdown must not be returned until all shutdown work has completed in the nonproxy worker thread contexts.