[libhid-discuss] libhid + swig -> c#
xiaofanc at gmail.com
Sat Apr 9 23:54:20 UTC 2011
On Sun, Apr 10, 2011 at 6:56 AM, Charles Lepple <clepple at ghz.cc> wrote:
> On Apr 8, 2011, at 1:25 PM, Rudolf Muehlbauer wrote:
>> I am wondering what the current status of libhid is. Is it still
>> maintained, used? The last svn commit was back in 2008.
> I have been recommending that people consider HIDAPI instead. It seems to be
> much better at the cross-platform goal than libhid, since libusb isn't
> always the best solution. (On the other hand, I haven't tried HIDAPI myself.
> Maybe someone else on the list has.)
I tried HIDAPI a bit and it is quite good. On the other hand, it does
not have enough bindings and the packaging of it is not that great.
It has great potentials though.
>> I am interested to use it in a project written with Mono/C#. Is it much
>> of a hassle to generate the C# bindings?
> It would certainly be a to me, since I don't know C#. If you have used SWIG
> before, I imagine it would not be that difficult. I suspect the biggest
> hurdle would be wrapping libusb for use in C#.
Travis Robinson (current developers of libusb-win32) is also the developer
of libusbdotnet, a great C# bindings for libusb. It works under Linux
and Mac OS X with Mono, but only with libusb-1.0. For Windows, it
works with libusb-1.0, WinUSB and libusb-win32.
> Actually, if you don't need the hidparser library (i.e. you know the report
> structures), there is not much to libhid. Look at the source for the
> functions which you would use - they are mostly error-checking.
More information about the libhid-discuss