Hi Jacek,
On 9 February 2015 at 12:49, Jacek Bzdak <
jbz...@gmail.com> wrote:
> char[8] result;
> GetParam(1, &result, 8) //This fills result with some data
> printf(result);
Hum, are you very sure that this C code is correct? The obvious typos
--- there are 4 of them on 3 lines --- make me think that you didn't
try to execute such C code...
What does GetParameter() do with its "void **" argument? Shouldn't
the C code be rather like this:
void *result;
GetParameter(1, &result, 8); // returns a "void *" by writing it to result
puts((char *)result); // print it by assuming a pointer to
// a null-terminated string
If it is, then the corresponding cffi is:
p_result = ffi.new("void *[1]")
GetParameter(1, p_result, 8)
print ffi.string(ffi.cast("char *", p_result[0]))
A bientôt,
Armin.