I wanted to call one exported function in a Dll written using C Language from my chrome extensions. But not getting sufficient info on how to do that.
In Firefox I am using below mention code in my extensions js file to do so, but same is not working in chrome.
var InstallPath="C:\\FRViewPortExtn.dll";
Components.utils.import("resource://gre/modules/ctypes.jsm");
var lib = ctypes.open(InstallPath);
/* Declare the signature of the function we are going to call */
passBrowserResizeData = lib.declare("SetViewPort",
ctypes.winapi_abi,
ctypes.void_t,
ctypes.int32_t,
ctypes.float32_t,
ctypes.int32_t,
ctypes.int32_t);
and calling using
passBrowserResizeData(6,7,8,9);
Please help me on how it can be done using chrome exteniosns
Place FRViewPortExtn.dll relative to manifest file and add the following code to manifest.json
Put this piece of code in your JS(content js\background js\extension js)
For more information refer https://developer.chrome.com/extensions/npapi.html