Stephan
Tue Dec 16 12:33:10 CST 2003
You MiniportHalt() will for sure get called before the miniport driver
gets unloaded.
Note that virtual adapters of MUX intermediate drivers need to be
started by the driver itself via NdisIMInitializeDeviceInstance(). But
MiniportInitialize() might still not get called if the adapter has
been manually disabled by the user (see also
http://groups.google.com/groups?threadm=qh75qvoel176lba61lt0nhn48php857bsl%404ax.com).
Note also that NDIS will only unload a MUX driver when all protocol
bindings are closed, NdisMDeregisterDevice() has been called if
applicable, and MiniportHalt() has been called for all previously
initialized virtual adapter instances, in this order.
If your driver is not a MUX IM, what kind of driver is this? NDIS_WDM?
Stephan
---
On Fri, 12 Dec 2003 15:08:37 -0800, "Billy Ng"
<ngbh_NO_SPAM@nswc.navy.mil_INVALID> wrote:
>Hi, I have question about unloading the driver. I am
>writing a virtual network driver. However, I often have
>problem to undisable or unload the virtual network
>device. Whenever the device is disabled or unloaded, I
>expect Windows will run HaltHandler routine. It does not
>seem to happen on WinDbg when I have problem to disable or
>unload the device. Any idea? Thanks in advance.