[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: luaffi/luaffi question: Calling c function ptr possible?
- From: Björn Kalkbrenner <terminar@...>
- Date: Fri, 10 Jul 2015 12:53:15 +0200
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