1

I haven't used Visual C++ before, however I'm starting a project that will require me to use it.

I want to get raw data from the USB. Almost every website tells me that I need to write a device driver for it first... Well I know that!

But I want to start simple - with my wireless mouse receiver, which obviously has a driver installed, which works. How can I access the contents which that receiver provides to the computer, using Visual C++?

1 Answers1

0

This is a great project - a ton of fun too. Perhaps you can find some resources from this related post. I go into a lot more detail there. But I'll answer a little bit here too.

First off, you definitely don't want to write a driver. The time of writing drivers is mostly behind us. :) At least for what you are trying to do in particular. As I detail in the aforementioned post, we now mostly use HID descriptors to communicate with HID (usb) devices instead of writing drivers. This is awesome because it seriously simplifies the task.

I will highly recommend you or anyone in the same position use the libusbx library. It makes things very simple and straightforward in terms of communicating directly with HID devices. Again, see the post for a much more involved answer, but this should do it. Good luck!

Community
  • 1
  • 1
eatonphil
  • 13,115
  • 27
  • 76
  • 133