-
Notifications
You must be signed in to change notification settings - Fork 397
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
Story: WinRT backend for Windows #329
Comments
I have had a little "weekend codding" session, and tried to implement the WinRT backend implementation for HIDAPI, and here is the result: https://github.com/libusb/hidapi/compare/winrt I'm not even sure if it worth making a PR into master as of yet, but here are some statements about the implementation:
And I wasn't able to test it intensively, keeping it in the branch for now. Just in case someone would want to play with it. |
The Microsoft Store is no longer restricted to UWP: https://developer.microsoft.com/en-us/microsoft-store/desktop-apps |
I believe there're still restrictions on WinAPI usage (and HIDAPI/WinAPI doesn't follow them). |
This seems to work pretty well, tested under Windows 11 with VS2022. Edit: this is not correct. So I deleted the output. |
I do not believe you've actually used the winrt backend. |
Here is the output for the draft WinRT backend. Other than the limitations mentioned in the first post, I can see that product string is also not correct when there is none. Now it uses the computer name. Click for the details
|
Output from the normal Windows backend as a comparison. Click for the details
|
Another computer using Windows 10. click for the run log for WinRT backend
Normal Windows backend output. click for the run log for normal Windows backend
|
Looks about right - consistent with my testing. |
Current Windows backend is WinAPI based.
There is also an alternative - WinRT API, and it actually uses a different implementation.
More discussion about it: #282.
Having an alternative backend might be useful in the future. Leaving this ticket to follow up on it if someone ever gets to finish it.
Some attempt to move in this direction:https://github.com/LeeChunHei/hidapiUPD: see next comment.
A general recommentation is to have this backend implemented in C++, due to way simpler implementation, when it comes to WinRT, compared to C.
The text was updated successfully, but these errors were encountered: