3

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!

4
  • Can you be a little more specific? Will this web page just be browsed to or is it hosted in some way like through a WebBrowser control? Commented Aug 11, 2011 at 9:48
  • Is the DLL COM Visible? Does the web browser have weak security? You should keep the DLL server side and call it with AJAX perhaps. Commented Aug 11, 2011 at 9:48
  • Such behavior is not fit for public websites. Commented Aug 11, 2011 at 9:59
  • 3
    "I am new to c# and javascript programming!" + Invoking DLLs on user-system from websites = security disaster ready to happen. Commented Aug 11, 2011 at 11:31

2 Answers 2

3

Use the ActiveXObject class: http://www.dreamincode.net/forums/topic/38890-activex-with-c%23/

Sign up to request clarification or add additional context in comments.

Comments

1

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()

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.