-
Notifications
You must be signed in to change notification settings - Fork 131
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
query windows registry for all COM ports + Modem
class devices
#84
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9853d44
query windows registry for all COM ports
Crzyrndm 23151ca
individual unsafe blocks
Crzyrndm cb84ceb
add `Modem` as a device class to query for COM ports
Crzyrndm b0eb322
clarifying comment
Crzyrndm b30aa8d
filter to COM ports rather than removing LPT (unknown what else modem…
Crzyrndm 301f035
raw ports only need to be iterated if additional ports have been found
Crzyrndm eae981c
resolve typo in comment
Crzyrndm b8f065d
Clean up Clippy hint for checking for some interface
sirhcel 0720d5a
Stick to filtering out LPT ports on Windows
sirhcel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably be using the unicode (
SetupDiClassGuidsFromNameW
) or automatic (SetupDiClassGuidsFromName
) versions of all windows functions. Otherwise devices from non-english speaking manufacturers or users in different localities may run into issues getting correct device names and information.See: https://learn.microsoft.com/en-us/windows/win32/intl/unicode-in-the-windows-api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the API used hasn't changed in this PR, only the additional class being queried
https://github.com/serialport/serialport-rs/pull/84/files#diff-130c30419f44f04eb2238fe2f4482481ecc923ed216b379b214de25165b43dfeL37
I'm fine with updating to using the
_W
version (and update the registry query to do the same) here, or making a separate PR (which would make more sense to me if there's more instances than these two functions to update. I haven't looked)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, I think updating these in another PR instead of putting additional changes here makes more sense to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #89