Hi,
I've been trying to get the installation of ZooTycoon (demo downloadable from M$) to work. The installation stops at about 25% during the copying of files, right at the time a new background picture should be shown.
I have some questions now (with some accompanying text):
ZooTycoon creates a lot of windows that are all owned by the main thread (0x0009 in my case).
Several messages are posted to several windows in several threads. Because the messages are send to a hwnd and all windows are owned by 0x0009, all messages end up in the message queue of the main thread.
If a GetMessage or PeekMessage is done in the main thread everything is fine.
When however a GetMessage or PeekMessage is done with a hwnd=0 (NULL) it all depends in which thread the Get or PeekMessage is done, if one (or more) message is retrieved. In my case all Get or PeekMessages done in all other threads but the main one (0x0009) end up with nothing (always PENDING status)
It appears that on Windows the behaviour is different, in the ZooTycoon case, all GetMessages are done from the main thread (as seen by strace on Win2KProf). Maybe there is some logic that checks which thread own windows ?
Can somebody confirm my findings for the WINE part ? And of course can somebody confirm my findings for the WINDOWS part ?
It looks like I found the cause of my problem, now the fix !
If more info is needed, please let me know.
cheers,
Paul Vriens.
pvriens@xs4all.nl writes:
When however a GetMessage or PeekMessage is done with a hwnd=0 (NULL) it all depends in which thread the Get or PeekMessage is done, if one (or more) message is retrieved. In my case all Get or PeekMessages done in all other threads but the main one (0x0009) end up with nothing (always PENDING status)
That's the way it's supposed to work; message queues are per-thread, and a thread will never retrieve messages sent to another thread. Looks like there's some other problem here that causes the main thread to not run its message loop.
Hi,
That's the way it's supposed to work; message queues are per-thread, and a thread will never retrieve messages sent to another thread. Looks like there's some other problem here that causes the main thread to not run its message loop.
-- Alexandre Julliard julliard@winehq.org
The strange thing is that we DO try to retrieve the messages but in a different thread than windows appears to do ?
Investigation continues, but that probably boils down to investigating the windows installation and figure out why 'they' do the retrieving in the main thread.
Several (demo)games from M$ seem to have the same problem/issue BTW according to bugzilla. The application database shows that ZooTycoon was working somewhere in 2001 (with wineX that is). Luckily not so much changed during the last years ;-)
Cheers,
Paul.