The typedef for WNDPROC is wrong in winapi/types.lua#227. ```c typedef LONG (__stdcall* WNDPROC)(HWND, UINT, WPARAM, LONG); ``` the last parameter has to be *LPARAM* than *LONG* under 64bit context, otherwise luajit will crash whenever creating app's main window.