Link to home
Start Free TrialLog in
Avatar of Chris Johnston
Chris Johnston

asked on

Can you create your own driver for a USB device?

I have recently learned C++ and C#. That is, I have taken courses to understand the basics of them and now want to start using them for professional work. I have said I want to take on projects that push me to learn a lot more about these vast programming languages. I have a hardware device name Griffin PowerMate. It is a USB knob/wheel that can be helpful controlling a computer. For some reason, it does not have great support on Window 7, 10. It does have a driver for Window XP and Vista. I cannot get this device to do what I want in Windows 10. However, on a Mac computer, the driver is up to date and does everything I want. So, to me this proves what I want on the Windows side is possible. Is it likely to think that without an SDK from the company I could use C++ or even C# to create a driver for this device?
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

It is technically possible.  Windows 7 and newer probably won't install it unless you get it approved by Microsoft.
Avatar of Dr. Klahn
Dr. Klahn

Is it likely to think that without an SDK from the company I could use C++ or even C# to create a driver for this device?

Yes, it's technically possible.  But without the device specifications from the company that made the device, I'd say it's practically not feasible.

One could decompile the XP driver back into assembler, then try to figure out what is going on in the code.  But that's not a C solution, it's an assembler solution, and at that it's something that only a very expert assembler programmer would consider.

There is the additional drawback that writing a device driver in C is not at all like writing a program in C.  There is very limited freedom within the device driver framework, one must comply exactly with the standard device interface, and interface with the system only using the official Windows calls.  For many devices writing a driver is about one half electrical engineering and one half programming.

It would be difficult to say "New C programmer?  Sure, a device driver for an undocumented device is a great first project" and say it with a straight face.
Avatar of Chris Johnston

ASKER

I am not new to programming or computing. I am new to what it seems one would use to create a Windows driver (C++ C# Visual Studio etc.). I would say this is more interest than need. I realize the limitation of not having the SDK. Or any access to the electronic spec. I tend to be good at finding a way to reverse engineer many things. I figured I would get the sensible comments and advice from those more experienced than me with this. I appreciate the comments and advice a lot. I will use the suggestions here to decide where I go with this. Thanks to all. Thanks so much!
This search https://www.google.com/search?q=Microsoft+driver+programming+guide will bring up a number of Microsoft pages about the subject.
helpful. Thanks
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.