Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX DLL

Status
Not open for further replies.

Ladyhawk

Programmer
Jan 22, 2002
534
0
0
AU
I have created an ActiveX Dll and have put in the object tag into the HTML.

<OBJECT ID=&quot;CSystemInfo&quot;
CLASSID=&quot;CLSID:9BDC7620-424B-4A50-8964-23E4A7ED398A&quot;
CODEBASE=&quot;SystemInfoProject.CAB#version=1,0,0,0&quot;>
</OBJECT>

I know this is probably a dum question but how do I use the functions in the dll?

Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
Doh.. just figured it out.

Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
can i knwow how?

Known is handfull, Unknown is worldfull
 
Sure.

</head>

<body>

<OBJECT ID=&quot;MyClass&quot;
CLASSID=&quot;CLSID:9BDC8620-424B-4A50-8964-23E4A7ED398A&quot;
CODEBASE=&quot;MyProject.CAB#version=1,0,0,0&quot;>
</OBJECT>

<script language=&quot;vbscript&quot;>
Set objInfo = CreateObject(&quot;MyProject.MyClass&quot;)
document.write &quot;Result : &quot; & objInfo.GetMethodResult
</script>



Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
ah!!! ladyhawk thought u used vbscript. but note it works only in Internet Explorer. VBscript is not supported by many browsers....

Known is handfull, Unknown is worldfull
 
So I should have used JavaScript?

It would be pretty much the same code.

Ladyhawk. [idea]
** ASP/VB/Java Programmer **
 
nope i dont think javascript has CreateObject... i aint an expert in it. u can try the javascript forum or the ActiveX forum...

but what i said is only a suggestion... :)

Known is handfull, Unknown is worldfull
 
Here's how you do it in Javascript code:

<SCRIPT LANGUAGE=&quot;JavaScript&quot; TYPE=&quot;text/javascript&quot;>
<!--

var myObject = new ActiveXObject(&quot;MyProject.myClass&quot;);
myObject.myMethod();
myObject = null;

//-->
</SCRIPT>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top