Sharad
Sharad

Reputation: 973

Calling a dll function from JS XPCOM

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 function. Is it possible?

Upvotes: 1

Views: 1716

Answers (2)

sdwilsh
sdwilsh

Reputation: 4682

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

Upvotes: 2

jknair
jknair

Reputation: 4764

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/

Upvotes: 2

Related Questions