I'd like to monitor the content of an application's main thread's message queue, but I have no idea how to get the address of it (WinDbg, kernel debugging). Would anyone have a hint for me? The thing is, when our main thread stays in WaitForSingleObject for a longer period of time, we get sometimes "Not enough quota..." when calling PostMessage afterwards. It's clear to me it's about the message queue being overflowed, but I cannot find out (with Spy++) who posts so many messages to the main thread in the meantime.

And no, I can't change the awful design at the moment :) I know the main thread mustn't be used for waiting long for an event, but as I said - I can't change it in the next months.

I'd like to find out what messages overflow the queue, and my second idea (the first was Spy++) is to watch the main thread's message queue.

Perhaps there are other good ideas?

Regards, Maciej

有帮助吗?

解决方案

Perhaps this post http://blog.airesoft.co.uk/2009/11/jumping-the-queues/ may answer your question.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top