G
Guest
Please help me with this problem:
I have an assembly dll (C#) which is "well prepared" for COM interop; so, I have registered it using Regasm and I have created the type library. I have used this command:
regasm MyAssembly.dll /tlb:MyAssembly.tlb
I have checked the registry and everything is registered properly.
I try to access from a VB script a class belonging to this dll, let's say MyClass. So, I did these things:
<reference object = "C:\Program Files\MyProduct\MyAssembly.tlb"/>
<script language="VBScript">
<![CDATA[
Dim myParams As MyAssembly.MyClass
Set myParams = Nothing
If (myParams Is Nothing) Then
Set myParams = New MyAssembly.MyClass End If
wscript.quit(0)
]]>
</script>
I have also added in PATH MyProduct path.
When I try to run the script, I receive the error: Cannot find the type library for this reference
What I do wrong here?
Thank you,
Ada
I have an assembly dll (C#) which is "well prepared" for COM interop; so, I have registered it using Regasm and I have created the type library. I have used this command:
regasm MyAssembly.dll /tlb:MyAssembly.tlb
I have checked the registry and everything is registered properly.
I try to access from a VB script a class belonging to this dll, let's say MyClass. So, I did these things:
<reference object = "C:\Program Files\MyProduct\MyAssembly.tlb"/>
<script language="VBScript">
<![CDATA[
Dim myParams As MyAssembly.MyClass
Set myParams = Nothing
If (myParams Is Nothing) Then
Set myParams = New MyAssembly.MyClass End If
wscript.quit(0)
]]>
</script>
I have also added in PATH MyProduct path.
When I try to run the script, I receive the error: Cannot find the type library for this reference
What I do wrong here?
Thank you,
Ada