Re: package.loadlib crashes?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: package.loadlib crashes?
- From: "Alex Queiroz" <asandroq@...>
- Date: 2007年4月12日 21:30:48 -0300
Hallo,
On 4/12/07, L-28C <kixdemp@gmail.com> wrote:
Hello everyone!
I want to use package.loadlib(), but when I run the returned function
(Beep in the below example) it crashes.
local Beep =
assert(package.loadlib("C:\\WINDOWS\\system32\\kernel32.dll", "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.
Help, please? Thanks in advance!
The Win32 API functions use a __stdcall calling convention. Maybe
that's the problem?
Cheers,
--
-alex
http://www.ventonegro.org/