Slight correction: you have a device object, that was created in
AddDevice. What you don’t have is access to the device itself. For
bus-connected devices, this means you don’t have the addresses of the
device’s registers (or, more rarely these days, its I/O ports) and for USB
devices you don’t have its endpoint address. So until the
IRP_MN_PNP:IRP_MN_START_DEVICE, you are unable to communicate with it.
For bus devices (PCI, PCIe) the boot sequence is definitely involved: the
PCI BIOS. For USB devices, they are not even visible until the USB Bus
Driver begins to operate, we’ll towards the end of the boot sequence.
I’ll vote +1 on the bad hardware/bad driver verdict.
By the way, my program has a bug. Can you tell me what is wrong? [Hint:
your question omits every important piece of information required to give
a useful analysis]
Joe
xxxxx@yahoo.co.in wrote:
> I need device serial number that method Due to execution is very fast,
> so some time device is boot successfully and get the serial number but
> some time it’s fail to retrieve the serial number because devices is not
> booted properly, I think so.
What kind of device is this, exactly? I would argue that you either
have a hardware design bug or a driver design flaw. For a PnP driver,
you aren’t allowed to do any hardware access at all until you get a
START_DEVICE request. Up until that point, you don’t have a device
object, which means you haven’t actually been asked to drive any
specific device, and you haven’t been assigned any resources.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
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