Essentially, I’m looking for a function like PostMessage(), but that is synchronous, so it doesn’t return until the message has been processed. It doesn’t necessarily have to be a function that does that (Because I don’t think that there is any) but I’m looking for a way to track the amount of time it takes for a windows message to get processed starting from the time it enters the message queue. SendMessage() would’ve been very useful but it bypasses the message queue. It’s also probably useful to mention that I’m sending the message to a completely different program so it’s not on the same thread.
I’ve tried SendMessage(), but it’s not what I’m looking for because I need something that goes through the message queue. PostMessage() isn’t suitable either because it returns immediately so I can’t track the message. I’ve looked into hooking to check all the messages getting processed by the other program but I’m trying to find something simpler.
thomasm is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.