Hello Gurus,
I need to send IOCTL to my bus driver from my coinstaller, bus driver
needs those IOCTLs for PDO creation. I am using DIF_INSTALLDEVICE and post
processing context for this. First I tried DDK’s enum sample to use in my
coinstaller and I found that SetupDiGetInterfaceDeviceDetail always fails,
then instead of using SetupDi function I created a symbolic link in my
bus driver for CreateFile. As soon as the coinstaller opens the handle
using CreateFile I get access violation in my driver’s Create routine. It
seems to me DIF_INSTALLDEVICE (post processing) is not the proper place to
do IOCTL operation, if so how is it done usually?
Any idea will be greatly appreciated.
regards,
Hakim
xxxxx@connecttech.com wrote:
I need to send IOCTL to my bus driver from my coinstaller, bus driver
needs those IOCTLs for PDO creation. I am using DIF_INSTALLDEVICE and post
processing context for this. First I tried DDK’s enum sample to use in my
coinstaller and I found that SetupDiGetInterfaceDeviceDetail always fails,
then instead of using SetupDi function I created a symbolic link in my
bus driver for CreateFile. As soon as the coinstaller opens the handle
using CreateFile I get access violation in my driver’s Create routine. It
seems to me DIF_INSTALLDEVICE (post processing) is not the proper place to
do IOCTL operation, if so how is it done usually?
The fact that you’re getting to the driver indicates that it’s been
loaded by the time your DIF_INSTALLDEVICE post-processing function is
getting called, so the timing is probably not the issue. Instead, there
is probably a mistake in the way you’ve coded your IRP_MJ_CREATE
handler. The fact that the you can’t get a link name via a reigstered
interface suggests that you may have made some (different) mistake in
the way you’re processing IRPs in the parent device stack.
–
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com