Solved

Calling DLL in JAVASCRIPT

Posted on 2004-08-10
10
12,519 Views
Last Modified: 2012-06-21
I have to call a dll from javascript.How I have to call that.Kindly help me in this.
0
Comment
Question by:jesudass
  • 4
  • 3
10 Comments
 
LVL 9

Expert Comment

by:bhagyesht
ID: 11769995
Is the dll on the server or client?

Regards,
Bhagyesh
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 11770003
if its on the client then use

ExcelApp = new ActiveXObject(<progID>);
where program id is the string for the com object.
like "Excel.Application"

Regards,
Bhagyesh
0
 

Author Comment

by:jesudass
ID: 11770051
Can you give me an example with the syntax plz.

0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 11770553
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:jesudass
ID: 11770626
Thanks a lot.I want synatx for the other type for <projid> can u call 1 ocx or dll with the classid with an example pls.
0
 
LVL 1

Expert Comment

by:JanMah
ID: 11771193
Hi,

If the DLL is in the client use the following
var l_Obj = new ActiveXObject("ComponentName.ClassName");

If it is OCX then in an ASP or HTML file use the following,

<OBJECT classid=CLSID:<Class ID> height="95%" align=center id=<Id> width="95%" >
</OBJECT>

JanMah
0
 

Author Comment

by:jesudass
ID: 11771215
I want to add an ocx or dll at runtime. I want to declare a variable as object then i want to assign an ocx as
var l_Obj = new ActiveXObject("ComponentName.ClassName");
similar to this can I give classid instead of this I have developed an OCX I know the classid .How do I call at runtime.
0
 
LVL 9

Accepted Solution

by:
bhagyesht earned 125 total points
ID: 11771364
in this case u need to install it on the client pc and register it. u may need to use a web installer to install this once done u can call it

Regards,
Bhagyesh
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now