我用lua调用windows API出现故障!看不懂,求救!平台:win7、lua5.1forwindows
<i>require "alien"
--alien.load("Dll.dll")
--print(alien.defalt)
--[[
def = alien.load("msvcrt.dll")
def.puts:types("int", "string")
def.puts("foo")
scanf = def.scanf
scanf:types("int", "string", "ref int", "ref double")
_, x, y = scanf("%i%lf", 0, 0)
print(x, y)
--]]
local Kernel32 = alien.load('kernel32.dll')
GetTickCount = Kernel32.GetTickCount
GetTickCount:types{ret = "ulong", "void", abi = "stdcall"}
local c = GetTickCount(nil)</i>