Hi all,
I wrote a USB HID mouse driver and I’m trying to write an install
procedure for it. I found a tutorial on MSDN regarding this and I wrote
few procedures along these lines.
The preinstallation works fine: since my driver is not signed (yet) it
asks me for confimation but that’s all. The system gets to know
correctly the location of the driver.
My problems come when I try to reinitialize the phantom devnodes. With
SetupDiGetClassDevs and others I find all the interesting devnodes, than
I check with CM_Get_DevNode_Status expecting a CR_NO_SUCH_DEVINST for
phantom devnodes and then I get and set ORing with CONFIGFLAG_REINSTALL
the CONFIGFLAGS.
By looking at the return codes, everything seems to be fine, however,
when I plug the device no enumeration seems to happen.
So before getting into the problem if my driver gets really loaded or
not, I have to do something to enable at least a reenumeration for
already plugged devices (not present).
Is there something that I’m overlooking?
Using the device manager I can manually select my driver and everything
works fine.
I have been told that I might have problems trying to have the system
use my mouse driver instead of the generic one. They told me that if my
driver is not signed, even if it matches my device more closely (with
both VID and PID) than the system’s one, the system will choose its
generic one because is signed. Is this true? If yes, is there a
workaround for this problem?
Thank you very much,
Marco.
This all seems quite a bit more complicated than it needs to be.
What exactly are you trying to do? Replace the system’s builtin
mouhid/hidmou driver? That’s not really recommended for a lot of
reasons. Can you filter above and/or below one or both of those? If so,
all you should need is an INF file that adds your driver as an
UpperFilter or LowerFilter. Grunging through the devnodes shouldn’t
really be necessary.
Marco Laurenzano wrote:
Hi all,
I wrote a USB HID mouse driver and I’m trying to write an install
procedure for it. I found a tutorial on MSDN regarding this and I wrote
few procedures along these lines.
The preinstallation works fine: since my driver is not signed (yet) it
asks me for confimation but that’s all. The system gets to know
correctly the location of the driver.
My problems come when I try to reinitialize the phantom devnodes. With
SetupDiGetClassDevs and others I find all the interesting devnodes, than
I check with CM_Get_DevNode_Status expecting a CR_NO_SUCH_DEVINST for
phantom devnodes and then I get and set ORing with CONFIGFLAG_REINSTALL
the CONFIGFLAGS.
By looking at the return codes, everything seems to be fine, however,
when I plug the device no enumeration seems to happen.
So before getting into the problem if my driver gets really loaded or
not, I have to do something to enable at least a reenumeration for
already plugged devices (not present).
Is there something that I’m overlooking?
Using the device manager I can manually select my driver and everything
works fine.
I have been told that I might have problems trying to have the system
use my mouse driver instead of the generic one. They told me that if my
driver is not signed, even if it matches my device more closely (with
both VID and PID) than the system’s one, the system will choose its
generic one because is signed. Is this true? If yes, is there a
workaround for this problem?
Thank you very much,
Marco.
–
…/ray..
Please remove “.spamblock” from my email address if you need to contact
me outside the newsgroup.