About SendPacketsHandler

Hi!
I want to write a ndis intermediate driver and it’s used for filtering the
IP Packet.
I build this intermediate driver based on the sample passthru which is
contained in the win2k ddk.
In the sample passthru, it use the SendHandler to send packet and I change
it to SendPacketsHandler.
After I added the my code into it, the driver can be installed and running
quite correctly, but the machine will hang up when I try to uninstall it.It
seems the matter occured during NdisIMDeInitializeDeviceInstance is running
in the protocol’s UnbindAdapterHandler.
If I remove the code added in the SendPacketHandler by myself, everything
is ok.
Anyone knows why this happened?
Any help will be appreciated.