void* somefun() { return &eax; }
function rmorework() { Components.utils.import("resource://gre/modules/ctypes.jsm"); var lib = ctypes.open("C:\\myapp\\dl1.dll"); var ans= lib.declare("somefun" , ctypes.stdcall_abi , ctypes.int8_t ); alert("generating result.... "); var ptrs = ans(); alert("MessageBox result : "+ptrs); ////(which is void*) lib.close(); }
alert("MessageBox result : "+ptrs);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)