Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages
Started by Tumurbaatar S.
Mon, 20 Nov 2006 19:48
Message queue size
Author: Tumurbaatar S.
Date: Mon, 20 Nov 2006 19:48
Date: Mon, 20 Nov 2006 19:48
14 lines
1237 bytes
1237 bytes
In my multi-threaded app, I use below code to create a message queue for a
thread:
PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
Other threads sends message to this thread:
PostThreadMessage(...);
And my question:
What is size of a message queue? Is there a chance to lost messages due
to
the queue's overflow?
Re: Message queue size
Author: Remy Lebeau (TeamB)
Date: Mon, 20 Nov 2006 20:01
Date: Mon, 20 Nov 2006 20:01
15 lines
1233 bytes
1233 bytes
"Tumurbaatar S." <spam_tumur@magicnet.mn> wrote in message news:45620661$1@newsgroups.borland.com... > What is size of a message queue? 10,000 messages. > Is there a chance to lost messages due to the queue's overflow? Yes, it is possible, though unlikely. Post...Message() will return FALSE if a message cannot be posted. Gambit
Re: Message queue size
Author: Tumurbaatar S.
Date: Mon, 20 Nov 2006 23:59
Date: Mon, 20 Nov 2006 23:59
26 lines
1594 bytes
1594 bytes
Thank you! 10 thousands are too big to be overflowed. So, is there any other reason that Post...Message() returns FALSE? Of course, the destination window or thread is ok, i.e. handle is valid. "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:45620a3b$1@newsgroups.borland.com... > > "Tumurbaatar S." <spam_tumur@magicnet.mn> wrote in message > news:45620661$1@newsgroups.borland.com... > >> What is size of a message queue? > > 10,000 messages. > >> Is there a chance to lost messages due to the queue's overflow? > > Yes, it is possible, though unlikely. Post...Message() will return FALSE > if > a message cannot be posted. > > > Gambit > >
Re: Message queue size
Author: Remy Lebeau (TeamB)
Date: Tue, 21 Nov 2006 00:24
Date: Tue, 21 Nov 2006 00:24
13 lines
1473 bytes
1473 bytes
"Tumurbaatar S." <spam_tumur@magicnet.mn> wrote in message news:4562414e@newsgroups.borland.com... > 10 thousands are too big to be overflowed. So, is there any other > reason that Post...Message() returns FALSE? Of course, > the destination window or thread is ok, i.e. handle is valid. Then no, there is no other way that Post...Message() should fail. If it is, then you need to use GetLastError() to find out why it is failing. Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads