简体   繁体   中英

How to call the methods in a dll from javascript?

I created a c# class library. I need to to call a method in the library file javascript using the dll.The javascript will be embedded in a web page already created. The dll will be on the client machine. Can someone help?
Ps:the method returns a boolean

More details: Actually the website is a virtual web conferencing software in which each one has a particualr avatar. I have to detect whether a particular software(needed for making video calls) is installed in the user's system.If it is installed i have to indicate that by showing some special symbols on his avatar.I made a c# class library which returns "true" if the software is installed in the system.Now i have to embed this in the virtual conferencing web software

I am new to c# and javascript programming!

Possible solution:

You need to register your dll at the destination computer. Than in js you need to create ActiveX object with the same registered name

var ObjFromDll = new ActiveXObject("DllRegisteredName");

and call it's method.

var anyResult = ObjFromDll.MyMethod()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM