You can also get multiple driver entries calls if you munge the inf file to
the point that the IO manager thinks it needs to load your driver again.
It’s been a number of years since I caused that faux pax, so I do not
remember the specifics, but it can happen.
Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Monday, October 25, 2010 4:34 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Question on how/when drivers are loaded
xxxxx@woolyloach.com wrote:
…I’m seeing DriverEntry() called multiple times. This is puzzling as I’m
only asking to be loaded for one specific device. I expect it’s an error in
my INF file, but it does bring up the question: under what circumstances
will Windows load a new instance of my driver, instead of simply calling
DeviceAdd()? I’m puzzled as to what’s going on under the hood…
The only time you should see a new DriverEntry is if you get unloaded.
If you unplug a USB device and then replug, the driver is unloaded, and then
reloaded, which means a new DriverEntry call.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
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
__________ Information from ESET Smart Security, version of virus signature
database 5562 (20101025) __________
The message was checked by ESET Smart Security.
http://www.eset.com