 |
| Javascript General Javascript discussions. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

August 26th, 2004, 05:21 AM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hai Joe.
i sent code to ur hotmail address.
i awaiting for ur reply
thanks
prabhakar G
|
|

August 26th, 2004, 07:28 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
I've replied to your email.
--
Joe (Co-author Beginning XML, 3rd edition)
|
|

May 25th, 2006, 03:37 AM
|
|
Registered User
|
|
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Mr.Prabhakar,
Have you got the solution for the folowing problem. If you got the solution please send me th solution .. because i am laso facing the same problem. Please send me the solution as much as possible fast.
My mail Id is: [email protected]
Thanking you,
Praneeth.Padala
Quote:
quote:Originally posted by prabhakar123
Hi,
i want to call DLL Method in Javascript .
dll name is JSDll.dll having method TestMethod().
i want to call TestMethod () from Javascript ?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script type='text/javascript' language='javascript'>
function comEventOccured()
{
try{
var myobject;
myobject = new ActiveXObject("JSDll.CoTest");
alert("Test1");
alert(myobject.TestMethod()); // HERE i want to call DLL Function .
}
catch(e)
{
//if(e.message == "Automation server can't create object")
//myobject = new ActiveXObject("JCJInterface.dll");
////alert("myproject value in javascript "+myobject);
}
//action="/exchweb/bin/auth/owaauth.dll"
}
</SCRIPT></HEAD>
<BODY>
<INPUT TYPE=button value=DLL onClick="comEventOccured()">
<br>
<input type=submit value=submit >
</BODY>
</HTML>
if any answer , it should be appecripted.
regards,
prabhakar G
|
|
|

September 12th, 2006, 08:55 PM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi,
i can call dll in using javascript in IE. My page failed in Mozilla. Could u tell me how can i call that dll in Mozilla. I want to support dual browser (IE and Mpzilla). Pls help me.
|
|

September 13th, 2006, 01:37 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
Basically you can't. At the end of the day if you want to do something via a DLL that could compromise the user's security they will have to install an add in of some kind, ActiveX with IE or a Gecko extension.
--
Joe ( Microsoft MVP - XML)
|
|

September 14th, 2007, 05:01 AM
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Can you please send me the solution.
I need to call BHO from javascript.
|
|

September 14th, 2007, 05:05 AM
|
|
Registered User
|
|
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
BHO function from javascript.
|
|

September 15th, 2007, 08:50 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
You call it the same as any COM class. Use new ActiveXObject and the prog id to create an instance and then call the methods. Unless the browser security settings are extremely low it is unlikely that you'll be able to create the object to begin with though. If you need more help then provide details of waht you have tried, the BHO's prog id and some details of what it does.
--
Joe ( Microsoft MVP - XML)
|
|

May 7th, 2008, 05:12 AM
|
|
Registered User
|
|
Join Date: May 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi guys,
i am new in COM. How can i register the .net dll file into COM assembly?
then tell me the next procedure to called the methode in this dll through vbscript.
Plz plz ..help me...
Thanks in advance
Ambarish
|
|

May 7th, 2008, 05:44 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
You need to use RegAsm, see http://msdn.microsoft.com/en-us/library/tzat5yw6(VS.80).aspx. Once you do that you can use the .NET assembly like another COM library. Many .NET classes are already COM enabled when the framework installs, e.g. System.Random. You can find these in the HKCR hive of the registry. Like any ActiveX control there maybe security issues trying to use in a browser though.
--
Joe ( Microsoft MVP - XML)
|
|
 |