Git Product home page Git Product logo

mightyhid's People

Contributors

twatorowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mightyhid's Issues

Not working on windows 7

Hi,

In the windows 7 its possible to list the devices and make the handle but every data that you send to the device, is not passed to him.

hid.dll missing

when running on desktop pc (windows 7, 8, 8.1, 10 ), problem was not.

when using tablet, system.componentmodel.win32exception was occurred.

i found native.css use 'hid.dll.'
but this tablet have not.

What should I do to fix this problem?

sorry for bad english.

---------tested with --------
Model : lenovo YOGA Tablet 2-1051F
windows 8.1, 10

Not all HID devices listed

I notice that my RFID card reader was not listed. The problem was CreateFile in HIDBrowser.cs.

Instead of

return Native.CreateFile(path,
    Native.GENERIC_READ | Native.GENERIC_WRITE,
    Native.FILE_SHARE_READ | Native.FILE_SHARE_WRITE,
    IntPtr.Zero, Native.OPEN_EXISTING, 
    Native.FILE_FLAG_OVERLAPPED,
    IntPtr.Zero);

I used

return Native.CreateFile(path,
    0,
    Native.FILE_SHARE_READ | Native.FILE_SHARE_WRITE,
    IntPtr.Zero, 
    Native.OPEN_EXISTING, 
    0,
    IntPtr.Zero);

Listing works fine now.

Exception thrown when browsing

We are getting a System.ComponentModel.Win32Exception from MightyHID.HIDBrowse.Browse(), as follows:
  HResult=0x80004005
  Message = Element not found
  Source = MightyHID
  Stack trace:
   at MightyHID.HIDBrowse.GetVidPid(IntPtr handle, Int16& Vid, Int16& Pid)
   at MightyHID.HIDBrowse.Browse()
   [...]

So the VID and PID could not be retrieved for some device, and Browse() doesn't catch. I think it should, and then either skip that device altogether or fill in some invalid values (like -1) for the VID and PID. Does that sound reasonable?

License

Please add a license file/info.

SafeFileHandle?

Is there a reason you are using IntPtr instead of SafeFileHandle? It is my understanding that .NET framework SafeFileHandle will take care of properly closing the handles automatically. So SafeFileHandle would free up the native resources in most cases even if the user code doesn't and especially in the case where there is a program crashes which would certainly not close the native resources.

parameter incorrect.

Hi just set everything up but get parameter incorrect. on this line.
_fileStream.Write(data, 0, data.Length);

any ideas?

error:
An unhandled exception of type 'System.IO.IOException' occurred in mscorlib.dll
Additional information: The parameter is incorrect.

This normally is a sharing issue but I don't see what would be using this stream.

Also this is a gamepad device I created with reports I use with HID.dll already (c command line tool)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.