On your .NET side:
- Create a ClassLibrary with this code:
Public Interface MyInterface
Function Sum(ByVal i1 As Integer, ByVal i2 As Integer) As Integer
End Interface
Public Class Class1
Implements MyInterface
Public Function Sum(ByVal i1 As Integer, ByVal i2 As Integer) As Integer
Implements MyInterface.Sum
Return i1 + i2
End Function
End Class
- Register the class library for COM Interop (Project Properties window,
Build node)
On your VBScript side:
Dim objClass1 As Object
Set objClass1 = CreateObject("ClassLibrary2.Class1")
MsgBox objClass1.Sum(1, 1)
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com
"G Leifheit" <GL*******@discussions.microsoft.com> escribió en el mensaje
news:0E**********************************@microsof t.com...
Could anyone point me to where there is more information available on
calling
a vb.net dll from a vbscript? I have found some links, but most are
pretty
unclear as to what is needed.