开发者

Calling a dll function from JS XPCOM

开发者 https://www.devze.com 2023-01-19 16:19 出处:网络
I wanted to know if the XPCOM JS can call an external dll function? I have a dll that exposes certain functions. I want my XPCOM JS function to be able to call the dll 开发者_如何学JAVAfunction. Is i

I wanted to know if the XPCOM JS can call an external dll function?

I have a dll that exposes certain functions. I want my XPCOM JS function to be able to call the dll 开发者_如何学JAVAfunction. Is it possible?


well you cannot call external dlls from JS unless the dlls are XPCOM components take a look here https://developer.mozilla.org/en/How_to_build_a_binary_XPCOM_component_using_Visual_Studio then u can use JS to call the functions exposed by the dlls by defining them in the XPT

edit a tutorial : http://nerdlife.net/building-a-c-xpcom-component-in-windows/


In Firefox 4 and later, you can use JS C-Types to accomplish this.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号