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.
23 lines
361 B
23 lines
361 B
require "localization"
|
|
local ffi = require "ffi"
|
|
|
|
local loader = {}
|
|
|
|
loader.load = function(path)
|
|
local s, r = pcall(ffi.load, __(path:string()))
|
|
if not s then
|
|
log.error('failed: ' .. r)
|
|
return false
|
|
end
|
|
loader.dll = r
|
|
ffi.cdef[[
|
|
void Initialize();
|
|
]]
|
|
loader.dll.Initialize()
|
|
return true
|
|
end
|
|
|
|
loader.unload = function()
|
|
end
|
|
|
|
return loader
|
|
|