[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaJIT FFI callbacks (was Re: Calling lua functions from C when using luajit ffi.)
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 16 Nov 2011 18:11:43 +0200
On Tue, Nov 15, 2011 at 1:27 AM, Mike Pall <firstname.lastname@example.org> wrote:
> The first example is for Windows that lists all window titles, the
I'm seriously impressed!
But I did notice a problem with this example:
With my Windows 7 x64 machine (VS 2010 build) this script runs fine up
to a point, and then hangs. If I replace the
C.SendMessageA(hwnd,C.WM_GETTEXT,255,lbuf) with a
C.GetWindowTextA(hwnd,buf,255) then things complete normally.
I think from  that sending a message may actually block if the
window is unresponsive for some reason, and GetWindowText is designed
to handle this case.
So it probably isn't a LuaJIT issue at all!