Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
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
 
Old August 26th, 2004, 05:21 AM
Registered User
 
Join Date: Aug 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hai Joe.

i sent code to ur hotmail address.

i awaiting for ur reply

thanks
prabhakar G

 
Old August 26th, 2004, 07:28 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I've replied to your email.

--

Joe (Co-author Beginning XML, 3rd edition)
 
Old May 25th, 2006, 03:37 AM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


 
Old September 12th, 2006, 08:55 PM
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.

 
Old September 13th, 2006, 01:37 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
 
Old September 14th, 2007, 05:01 AM
Registered User
 
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sikunj Send a message via Yahoo to sikunj
Default

Can you please send me the solution.
I need to call BHO from javascript.

 
Old September 14th, 2007, 05:05 AM
Registered User
 
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sikunj Send a message via Yahoo to sikunj
Default

BHO function from javascript.

 
Old September 15th, 2007, 08:50 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)
 
Old May 7th, 2008, 05:12 AM
Registered User
 
Join Date: May 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

 
Old May 7th, 2008, 05:44 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

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)





Similar Threads
Thread Thread Starter Forum Replies Last Post
program that call its method automatically mfahadwallam BOOK: Beginning Java 2 0 January 28th, 2008 09:26 AM
Calling a function on every method call Takashi321 General .NET 1 September 21st, 2007 09:33 AM
Can I call a method that populate a Label??? cp75 ASP.NET 1.0 and 1.1 Basics 2 January 12th, 2007 05:39 AM
how to call a method from childMDI1 into childMDI2 raj_k C# 0 June 26th, 2005 04:54 PM
How to call a C# method from VB.Net? aliarifpk General .NET 1 February 26th, 2004 04:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.