I was handed down an assignment at work today and I don't know where to start. The goal of the program I am supposed to make, is to find a specific device connected through USB, report back which host controller the device is connected to. It is to then use the location to find it in the registry and change a value. the last part I have, I just can't seem to find a way to find the device and where it is connected, so any help I can get would be greatly appreciated.
Having done something along theses lines recently - You can use the DeviceIoControl function to send IOCTL requests to
a HOSTCONTROLLER, or HUB to get information about connected devices.
You can send IOCTL requests to get the device descriptors.
You will need the DDK headers - which the Microsoft SDK does not include by default. But you can download MINGW which does include the DDK header files.