Reading AND Writing to a USB Keyboard
Posted on 2006-06-19
I think this problem is, what one might call, a poison chalice! It goes as follows:
I have been given the task of communicating with a bespoke USB button pad. It represents a subset of a normal keyboard and basically contains function keys and left and right mouse button clicks. As well as being able to read these keys and feeding them back to the OS (the bit I think I have the hang of) I also need to be able to write values to this device that allow me to control 4 LED's and the backlighting of the button pad.
In theory the button pad represents a standard Microsoft HID device for which I have a third part API that allows me (via VB) to communicate with it. Unfortunately I'm getting an error that typically occurs when you have select a system device that is in use by the operating system. As I understand it, for security purposes, Windows 2000/NT/XP retains exclusive access to all system devices including mice, keyboards, etc.
So this leaves me with the following problem;
1. How do I open to a USB device that represents a system device under Windows
2. I need help on how to communicate with said device via VB6 (my preferred choice only because the rest of the project is in VB)
3. I've also been given crazy time scales (crazier than normal) so there's 500 points up for grabs and I don’t mind a quick and dirty solution - basically I need to do this by any means necessary!
Thanks in advance!