Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to open the device #454

Closed
alireza11048 opened this issue Mar 7, 2020 · 3 comments
Closed

failed to open the device #454

alireza11048 opened this issue Mar 7, 2020 · 3 comments

Comments

@alireza11048
Copy link

Hi,

I am trying to communicate with an HID device with this library, I have two problems:

  1. to open the device for write&read I need to run the app with admin permission, is this normal?
  2. some times the library returns an error when I try to open the device, particularly it fails during calling CreateFileA function. and getlasterror() returns permision_denied in this situation. there is any known issue with this? and also the device path of my device is "\\?\hid#vid_1915&pid_520c&mi_01#8&20c16deb&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd" and also it appears as keyboard in system too.
@Youw
Copy link

Youw commented Mar 8, 2020

Please see #373

@Youw
Copy link

Youw commented Mar 8, 2020

Additionally: Windows driver subsystem owns all mouses and keyboards, so you cannot open those for read/write from user-space.
That is a known limitation - security enforcement.

If you need to communicate with mouse/keyboard, you better use native OS hooks for that matter, specifically designed to get mouse/keyboard related events.

This is one of the items we should add as part of #61

@alireza11048
Copy link
Author

Thank you, the problem has solved.

erikolofsson pushed a commit to Malterlib/hidapi that referenced this issue Feb 19, 2024
…ces (#601)

- unique Top-Level Usage_page/Usage: to be consistent with Windows/macOS (OS-level implementations).
- support for single Usage Page item for several UsageIDs; 
- support for 32bit Usage items;

Fixes: signal11#298
Fixes: signal11#454
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants