Questions tagged [message-pump]
53 questions
0
votes
0 answers
Why windows forms application could stuck in user32!__ClientWaitMessageExMPH?
I have multithreaded .net 4 windows forms application, that sometimes just stop to answer to user actions and Invoke() calls.
I have made a dump during this hang, and seems that main thread is blocked inside of waiting for user input.
Here is stack…

m3f
- 81
- 5
0
votes
0 answers
Prevent 'd3d9.dll' function 'D3D9SetMode' calling 'ChangeDisplaySettingsExA'
I am using a third party .dll which wraps around the DirectX d3d9.dll, modifying the original .dll's execution. A well known example of this type of setup is used by Fraps.
I am creating a Fullscreen exclusive device in multihead mode…

Hinchy
- 143
- 9
0
votes
1 answer
How to add a custom message pump supporting parameters?
This is related to this question:
How to create custom message pump?
I basically need the same message pump, except it also needs to be able to support input parameters. The answer from the question above, only supports Action() delegates, which…

Eternal21
- 4,190
- 2
- 48
- 63
0
votes
1 answer
Most efficient design pattern for event handling with locking
I have an application that receives events asynchronously from an API and can call methods synchronously on this API.
For thread-safety purposes, I need each synchronous function and each event handler in my application to be locked.
However,…

Erwin Mayer
- 18,076
- 9
- 88
- 126
0
votes
1 answer
'Invoke' and 'BeginInvoke' are called but never resolved
I am taking care of the GUI thread of a piece of software. I have to display inside a GridView data that needs to be constantly polled from the underlying APIs. I created a method called Sync() which updates the data, and I tried to make it thread…

user2335498
- 19
- 4
0
votes
2 answers
Win32 message pump, does DispatchMessage() handle entire message queue or just top message?
So i've been reading up on the Win32 message pump and I was curious if the DispatchMessage() function deals with the entire message queue, or just the message at the top of the queue?
For example, i've seen loops such as:
while(true)
{
MSG …

kbirk
- 3,906
- 7
- 48
- 72
0
votes
2 answers
Trouble with NativeWindow constructed in a thread context
I'm creating a NativeWindow subclass ('MyNativeWindow') in order to use its message pump to communicate with some old DLL. My code runs inside a WinForms application, but I'd like to keep the DLL and it's message processing outside the scope of the…

user142638
- 33
- 2
- 4
-2
votes
1 answer
Thread message pump
I want to get a working understanding of how message pumping works in the Windows system. I created a console application. I cteated new thread in this aplication:
var thread = new Thread(MessagePump) {IsBackground = true};
_thread.Start();
The…