RE: simple Lua alien question
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: RE: simple Lua alien question
- From: Thomas Buergel <Thomas.Buergel@...>
- Date: 2011年2月28日 10:21:30 -0800
> Running the following commands causes an access violation when Sleep returns.
> What am I doing wrong?
The calling convention on Win32 functions is stdcall, not cdecl.
local alien = require "alien"
Sleep = alien.kernel32.Sleep
Sleep:types( { ret = 'void', abi = 'stdcall', 'int' })
Sleep(1000)