Vulpes_Coders
Member
Hi, I am trying to create a library on Windows and the thing I need is to pass the function pointer as argument and then call it from my DLL.
I've managed to build the working DLL with some test functions, but I can't figure out how to pass that pointer.
The thing I tried was
I've also tried something like
Is it even possible, or am I just stupid?
I used Extensions to "define" my DLL, and in the extern
Edit:
When passing to the DLL's function
I've managed to build the working DLL with some test functions, but I can't figure out how to pass that pointer.
call(ptr(my_func));
, but the addresses didn't match. GML showed different value than DLL.I've also tried something like
call(my_func);
and it just straight out crashed.Is it even possible, or am I just stupid?
I used Extensions to "define" my DLL, and in the extern
call
function I've experimented with different argument types, like a pointer to an extern function, or just straight out lambdas.Edit:
When passing to the DLL's function
ptr(my_func)
it returns 0, but passing just function name like my_func
returns a valid (address?)
Last edited: