lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

> Is it even possible to cast a function pointer memory address to
> something luaffi can understand/call?

i think i have solved the problem, it seems to work. The cast was wrong.


=====
local cbAddr = ffi.cast("RESULT_CB*",data.cbAddr);
local _cb = ffi.cast("RESULT_CB",cbAddr[0]);
_cb(data.ResultID,0);
=====

Bye
Björn