Parameterized js functions using js-ctypes.
Girish Gaitonde <[email protected]> Thu, 8 May 2014 04:33:54 -0700 (PDT)
| Newsgroups | gmane.comp.mozilla.devel.plugins |
|---|---|
| Message-ID | <[email protected]> |
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??