Thanks for your replies Don and Maxim. I did some reading on INF files and
driver installation as directed and discovered that the link between the
driver and the device is specified via the "Model" section using a device
ID or a hardware ID. So when a PnP device plugs in with the OS, the
hardware installation system scans the installed INFs (if the driver hasn't
been associated with that device already) looking for one where the
device/hardware ID matches with the ID reported by the device on the bus.
If it finds one then it associates that driver for that device and if it
doesn't then it further explores to see if a generic class level driver can
be used instead. I was hoping to write a UMDF driver for the Windows 7
Sensor platform for a Bluetooth HID device and was wondering if it can be
loaded whenever the device pairs with the system. To test this out I
quickly built the sample skeleton sensor driver from the DDK and tweaked the
INX file to use a hardware ID (like this: HID\VID_1234&PID_5678). I was
thinking that the system would somehow figure out that my UMDF driver needs
to be stacked on top of the Bluetooth HID driver for accessing this device -
that it would show up as my custom device in the Bluetooth devices control
panel.
After tussling with "devcon" a bit (turns out I was using the 32-bit version
of devcon on my 64-bit Win7 system which is a strict no-no; not that the
error message "devcon failed" was very helpful!) I managed to get the driver
installed and it showed up just fine in the Sensors control panel. I
noticed that the driver got loaded as soon as I installed it. The OS didn't
seem to know anything about this driver when I next paired the device (after
removing it from the system first) - it continued to show up as a Bluetooth
HID device. In retrospect this makes sense and I assume specifying the
hardware ID using the HID enumerator (HID\VID_1234&PID_5678) will cause the
Bluetooth HID driver to be stacked below the sensor driver. I'll test this
out soon and see how it goes.
Thanks again!
--
Ranju. V
http://blogorama.nerdworks.in/
--