[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: package.loadlib crashes?
- From: L-28C <kixdemp@...>
- Date: Thu, 12 Apr 2007 20:57:33 -0400
Blah, that sucks!
It would make a nice feature though. Is there something like a
'wishlist' for Lua that I can submit ideas to?
Jerome Vuarand wrote:
I want to use package.loadlib(), but when I run the returned function
(Beep in the below example) it crashes.
local Beep =
"Beep")) Beep(12, 12)
I tried 5.1.1 and then 5.1.2, both give the same result.
I also tried MessageBox in user32.dll, same result.
As mentionned in package.loadlib manual entry, the functions you can
retrieve with it must be of the type lua_CFunction. You can't access
arbitrary C functions. IIRC there are modules out there that add that
functionnality, but stock Lua can't do what you want.