Girish Gaitonde
2014-05-08 11:33:54 UTC
Hi,
We are currently working on changing NPAPI based extension,to js-ctypes.
I want my "C" based function [dll], to access js function.
Till now we had success in calling js function which don't have parameters.
But now we need to send some data from dll, to js function.
Below is the prototype
var funcType = ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t,
[ctypes.voidptr_t]);
var funcPtrType = funcType.ptr;
var callback = funcPtrType(receiveMessage);
var ret = Wr_Request(JSON.stringify(data),callback);
js function
function receiveMessage()
{
var MB_OK = 3;
var ret_msgbo = msgBox(0, "Hello world" +
temp_char.address().readString(), "title", MB_OK);
};
Can anybody help out with this??
We are currently working on changing NPAPI based extension,to js-ctypes.
I want my "C" based function [dll], to access js function.
Till now we had success in calling js function which don't have parameters.
But now we need to send some data from dll, to js function.
Below is the prototype
var funcType = ctypes.FunctionType(ctypes.default_abi, ctypes.int32_t,
[ctypes.voidptr_t]);
var funcPtrType = funcType.ptr;
var callback = funcPtrType(receiveMessage);
var ret = Wr_Request(JSON.stringify(data),callback);
js function
function receiveMessage()
{
var MB_OK = 3;
var ret_msgbo = msgBox(0, "Hello world" +
temp_char.address().readString(), "title", MB_OK);
};
Can anybody help out with this??