When GetConsoleKeyboardLayoutName not implemented stop calling it #1303
Conversation
Maximus5
added a commit
that referenced
this pull request
Nov 7, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This eliminates recurring calls to GetConsoleKeyboardLayoutName when we get an error code that indicates that it is not implemented. These calls result in a bunch of debug out messages that appear in kernel debuggers (or DbgView when capturing the same events).
I've tested it on Windows 10 RS2 and verified that prior to my fix, the debug out matches that described in #1236. After my fix, the debug out messages about a deprecated and not implemented API call are no longer there.
Note that this does NOT fix the other debug message in the issue, about a bad handle from a call to GetConsoleDisplayMode. I concur with the issue comments that this one is a Microsoft issue that can't be fixed short of not calling that API at all.