|
|
||
|
> 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)