In the Win2k DDK description for NdisCloseAdapter it says: “A protocol must
call NdisCloseAdapter only from its ProtocolUnbindAdapter function. A
protocol must not call NdisCloseAdapter outside of this context.” But in
the passthru.sys example that comes with that DDK, they call
NdisCloseAdapter from MPHalt. OK, OK, thats in the miniport side of this
particular intermediate driver, but my driver is hanging right after the
call to NdisCloseAdapter. Here’s how it happens (which may be illegal or
morally wrong): When I physically disconnect the primary adapter from the
hub, the throughput grinds to a crawl. So when I get a
NDIS_STATUS_MEDIA_DISCONNECT in the ProtocolStatus handler, instead of
ignoring it, I call MPHalt. In MPHalt, it eventually calls
NdisCloseAdapter and thats where I hang.
I know a bunch of you have toyed with this sample intermediate driver,
anyone have a suggestion / comment? I am more concerned with how I should
handle the media disconnect than I am concerned with calling
NdisCloseAdapter outside of ProtocolUnbindAdapter.
Thanks,
John