Logs result of SendInput and PostMessage calls#23
Merged
Conversation
Adds logging to track the number of input events successfully sent by SendInput. This helps diagnose potential issues where not all input events are processed correctly. It logs an error if the number of sent events doesn't match the expected count and a trace if all events are successfully sent.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds diagnostic logging to track the success of SendInput API calls in the mouse event processing loop. The implementation captures the return value from SendInput and logs an error when not all input events are successfully sent, along with trace-level logging for successful operations.
- Captures and validates the return value of
PInvoke.SendInput - Adds error logging with Win32 error codes when input events fail to send completely
- Adds trace logging for successful input event transmission
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds logging to record the success or failure of PostMessage calls. Logs the last Win32 error when PostMessage fails, aiding in debugging. Logs successful message posts for tracing purposes.
This file contains hidden or 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
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds logging to track the number of input events successfully sent by SendInput.
This helps diagnose potential issues where not all input events are processed correctly. It logs an error if the number of sent events doesn't match the expected count and a trace if all events are successfully sent.