1
我用lua調用windows API發生故障!我無法理解,幫助! 平臺:WIN7,lua5.1forwindowslua調用GetTickCount細分
<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>
歡迎來到Stack Overflow。你需要對你的問題更精確。如果你像這樣形成你的問題,你不可能得到幫助。發佈所有相關的代碼和錯誤消息。 – Magnilex 2013-03-11 15:34:13