.NET API for HID (USB)? [closed]

爱⌒轻易说出口 提交于 2019-12-17 22:32:44

问题


Is there an API in .NET (C#) for using USB HID (Human Interface) devices?


回答1:


HidLibrary wraps up all the P/Invoke calls for you. But no it doesn't look there is any nice framework APIs for dealing with USB devices.




回答2:


Here's mine little lib for dealing with HIDs. Might be useful especially when you are trying to communicate using raw HID reports. I've also included a simple demonstration of how to use it.




回答3:


There's nothing direct or high-level. There are some things you can do through the managed WMI API, but I've personally found a lot of WMI interaction with hardware to be cryptic at best and requiring a lot of trial-and-error to get it to do what you want. Someone on CodeProject has developed a .NET component for USB HDI you can try out that's probably going to fit the bill better than WMI.




回答4:


I would suggest you follow this example instead. It was invaluable in getting me up and running with HiD dev in C#.




回答5:


I suggest you start here: http://wiimotelib.codeplex.com/




回答6:


Have you taken a look at this library?

http://code.google.com/p/csharp-usb-hid-driver/




回答7:


Try looking at this: Simple HID Library. The main page has a list of other open source libraries.




回答8:


I was also searching for it. I'm using the code I found here: http://janaxelson.com/hidpage.htm



来源:https://stackoverflow.com/questions/2803890/net-api-for-hid-usb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!