[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

how can i load c++ dll in javascript

Posted on 2009-02-22
8
Medium Priority
?
913 Views
Last Modified: 2012-05-06
how can i load c++ dll in javascript
0
Comment
Question by:hp746
8 Comments
 

Author Comment

by:hp746
ID: 23708415
and also i need to call the functions in the dll
0
 
LVL 13

Expert Comment

by:Xyptilon2
ID: 23708723
You cannot. JavaScript does not have access to the resources on localhost out of security reasons.
0
 
LVL 5

Expert Comment

by:sumitkchawla
ID: 23709145
What do you want to achieve by doing this? What i assume is that you want to use the Win32 functions without registering the DLL.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 15

Expert Comment

by:fsze88
ID: 23710213
try this

try{
var myobject;
myobject = new ActiveXObject("dllname.dllclass");
alert(myobject .somefunc());
}
catch(e){
}
0
 

Author Comment

by:hp746
ID: 23711224
i have written dll in c++ it has a function the excutes the database and return value to the calling function
0
 
LVL 5

Expert Comment

by:sumitkchawla
ID: 23718622
You should make your DLL as a COM DLL. Then you can register your DLL as a COM object on the user machine, and then can use the solution pointed by <fsze88:>.
0
 

Author Comment

by:hp746
ID: 23721691
sumit,
how can i make my dll as a com dll
0
 
LVL 5

Accepted Solution

by:
sumitkchawla earned 2000 total points
ID: 23722306
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question