[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [LuaJIT FFI] [Windows] "bad callback" error in MsgWaitForMultipleObjects() proof-of-concept
- From: Mike Pall <mikelu-1112@...>
- Date: Fri, 23 Dec 2011 23:19:24 +0100
Duncan Cross wrote:
> Are you certain it's MsgWaitForMultipleObjects() calling that WNDPROC
> callback itself though? My reading of the documentation for that
> function  is that it only waits until there is an event to process,
> it doesn't do anything about it - hence the usual calls to
> TranslateMessage/DispatchMessageA afterwards in the loop. I tried
> printing debug.traceback() in that callback - I see instances of
> CreateWindowExA(), ShowWindow(), UpdateWindow(), PeekMessageA() and
> DispatchMessageA() on the stack, but not MsgWaitForMultipleObjects().
Ah, yes, it's DispatchMessageA(). I haven't checked the Windows
docs for details.
> (I realise this may not affect the explanation/solution much, but in
> case it is significant I thought I better query this.)
Well, it was clear it's one of the functions in the message loop.
Doesn't really matter which one, though.