TDI DelNetAddress handler not being called

I’m having some problems with a driver that uses TDI. When I issue a
“net stop” command I can see that I call TdiDeregisterPnPHandlers but
my handler function that I’ve registered never does. At the time
TdiDeregisterPnPHandlers is called I still have a handle to the IP and
UDP devices: could that, or other resources, be preventing the handler
being called?


Bruce Cran

Deregistering the handlers does not mean you will get called to at the
handler. It means you are telling the system you do not want any more
callbacks.

Walk your own list of resources (after deregistering) and clean them up.

The contract in the DDI that says you will be called on registration to
enumerate existing transports/addresses (etc) is not reflexive. Your
callback is not called on ‘deregistration’ to remove the existing resources.

What is preventing the handler from being called is you deregistered it. It
is working as designed.

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Bruce Cran
Sent: Wednesday, December 02, 2009 10:53 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] TDI DelNetAddress handler not being called

I’m having some problems with a driver that uses TDI. When I issue a
“net stop” command I can see that I call TdiDeregisterPnPHandlers but
my handler function that I’ve registered never does. At the time
TdiDeregisterPnPHandlers is called I still have a handle to the IP and
UDP devices: could that, or other resources, be preventing the handler
being called?


Bruce Cran


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer