Journal KevMar's Journal: A Code sample I want to save 1
> Hi, I just would like to know if it s possible
> to have *any* code (C#, VB.NET, Jscript.NET ...)
> compiled to a DLL/COM/OCX ?
>
> and after that, is it possible to expose this compiled code
> to use it in WSH ?
Hi,
Sure you can do this. The two steps you need to take are to run RegAsm on
the .NET assembly, and to copy the dll into the WinNT\System32 directory.
// sample.js
package MyLibrary
{
class MyObject
{
function SayHello()
{
print("Hello!")
}
}
}
c:> jsc /t:library sample.js
c:> regasm sample.dll
c:> copy sample.dll %systemroot%\system32
// useit.js
var ob = new ActiveXObject("MyLibrary.MyObject")
ob.SayHello()
c:> useit.js
Hello!
Peter
> to have *any* code (C#, VB.NET, Jscript.NET
> compiled to a DLL/COM/OCX ?
>
> and after that, is it possible to expose this compiled code
> to use it in WSH ?
Hi,
Sure you can do this. The two steps you need to take are to run RegAsm on
the
// sample.js
package MyLibrary
{
class MyObject
{
function SayHello()
{
print("Hello!")
}
}
}
c:> jsc
c:> regasm sample.dll
c:> copy sample.dll %systemroot%\system32
// useit.js
var ob = new ActiveXObject("MyLibrary.MyObject")
ob.SayHello()
c:> useit.js
Hello!
Peter
Call web service from vb (Score:1)
Dim objWebSvcClient As New MSSOAPLib30.SoapClient30
Dim dTemp As Double
objWebSvcClient.MSSoapInit _
"http://www.xmethods.net/sd/2001/TemperatureServi
dTemp = objWebSvcClient.getTemp("60195")
MsgBox dTemp
Unload Me