SoUI 0.5版本占坑
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
346 B

local ffi = require 'ffi'
ffi.cdef[[
void* LoadLibraryW(const wchar_t* lpLibFileName);
int FreeLibrary(void* hLibModule);
]]
local uni = require 'ffi.unicode'
function sys.load_library(path)
local wpath = uni.u2w(path:string())
return ffi.C.LoadLibraryW(wpath)
end
function sys.unload_library(module)
return ffi.C.FreeLibrary(module)
end