Re: how to tell if hwnd is valid
- From: "Nick Schultz" <nick.schultz@xxxxxxxx>
- Date: Wed, 30 Jul 2008 10:45:13 -0700
"Joseph M. Newcomer" <newcomer@xxxxxxxxxxxx> wrote in message
news:6e8194ppbtindjgboinq4lngvb754tn7ne@xxxxxxxxxx
See below...
On Wed, 30 Jul 2008 09:25:16 -0700, "Nick Schultz" <nick.schultz@xxxxxxxx>
wrote:
Well I am using Mr. Newcomer's Completion I/O MsgWrapper to send messages****
between threads, however in large data bursts, the message pump gets
saturated and messages don't post.
That's simply not true. The whole point of the IOCP technique is so that
messages do NOT
get lost!
*****
What happens when PostMessage returns false?
BOOL PostMessage(
HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero.
your code deletes the message regardless of the return value
BOOL MsgWrapper::Forward()
{
BOOL result = wnd->PostMessage(msg, wParam, lParam));
delete this;
return result;
}
so if the message queue is filled, messages are dropped.
I see what you are saying about not closing the window until it has
processed all of its messages and will look into that.
.
- Follow-Ups:
- Re: how to tell if hwnd is valid
- From: Joseph M . Newcomer
- Re: how to tell if hwnd is valid
- References:
- how to tell if hwnd is valid
- From: Nick Schultz
- Re: how to tell if hwnd is valid
- From: Goran
- Re: how to tell if hwnd is valid
- From: Nick Schultz
- Re: how to tell if hwnd is valid
- From: Joseph M . Newcomer
- how to tell if hwnd is valid
- Prev by Date: Re: Conditionally remove menu item
- Next by Date: Re: Conditionally remove menu item
- Previous by thread: Re: how to tell if hwnd is valid
- Next by thread: Re: how to tell if hwnd is valid
- Index(es):
Relevant Pages
|