Re: NDIS IM & NdisMDeregisterDevice
- From: "TarasCo" <taralex@xxxxxxxxx>
- Date: 13 Dec 2006 09:33:16 -0800
2 Thomas F. Divine:
"""Thomas F. Divine писал(а):
"""
You can create an asynchronous "notification" IOCTL that the application
calls. The driver would pend the IRP for this IOCTL indefinitely. Basically
until some event occurs that requires the driver to notify the app. When
such an event occurs the driver would complete the IRP providing the detains
ok, i can do this.
1. My app open handle on my device ( I get them by calling
NdisMRegisterDevice at DriverEntry )
2. My app send special IRP and handler return STATUS_PENDING. So my app
can wait on it to find out when it should close handle.
First question: Driver may be uninstalled between 1 and 2. And I get
the same? Suppose it was not uninstalled.
3. User decide to uninstall my driver ( at long last!!! )
4. My driver get serial call to MiniportHalt routine. At the last call
it do some final action: complete special IRP ( 2 ) and call
NdisMDeregsiterDevice.
5. DriverUnload routine is called???
Second question: I think after completing special IRP i should wait for
all handel is closed in fact ( I can count IRP_MJ_CLOSE ). After that I
can call NdisMDeregsiterDevice and suppose DriverUnload will be called.
But is it safty waiting in system worker thread for long time? IMHO it
can block all network communication if app is in deadlock state for
example.
PS: One thing I cannot understand: why DriverUnload cannot be called
without NdisMDeregsiterDevice? It is the root of all my problems :).
.
- References:
- NDIS IM & NdisMDeregisterDevice
- From: TarasCo
- Re: NDIS IM & NdisMDeregisterDevice
- From: Thomas F. Divine
- NDIS IM & NdisMDeregisterDevice
- Prev by Date: Re: ... while holding a ...
- Next by Date: Re: error C2106 and error LNK2019:
- Previous by thread: Re: NDIS IM & NdisMDeregisterDevice
- Next by thread: Re: NDIS IM & NdisMDeregisterDevice
- Index(es):
Relevant Pages
|
Loading