COM interop or VBScript problem 
Author Message
 COM interop or VBScript problem

I've exported my .NET class as COM object. One parameter of the class is
ArrayList instance.
When I try to access it from VBScript, last construction doesn't work:

set con = CreateObject("ClassLibraryVB.MyArrClass")
set Arr2 = Con.Arr
MsgBox(Arr2(1)) 'Works fine
MsgBox(Con.Arr.Item(1)) 'Works fine
MsgBox(Con.Arr(1)) 'Wrong number of arguments or invalid property assignment
error

Where is the problem?

P.S. VB .NET class declaration:

Public Class MyArrClass
Public Arr As ArrayList

Public Sub New()

Arr = New ArrayList()

Arr.Add("666")

Arr.Add("777")

End Sub

End Class

A



Sat, 29 Jan 2005 20:59:37 GMT  
 COM interop or VBScript problem
Denis, this group is for earlier versions of VB. Post the question to
*.dotnet.* groups (try on microsoft.public.dotnet.framework.interop).

--
Eduardo A. Morcillo [MS MVP-VB]
http://www.domaindlx.com/e_morcillo



Sun, 30 Jan 2005 00:07:05 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. COM interop or vbscript problem

2. Com interop problem with Framework 1.1

3. Problem passing VB COM+ ASP Request object to .NET component System.Web.HTTPRequest through COM interop

4. Com/Interop problem

5. COM Interop problem

6. COM interop problems

7. COM Interop problem

8. COM Interop problem

9. Automation error referencing .net dll from com (com interop)

10. COM Interop question

11. Strong named COM Interop

12. ParamArray and COM Interop

 

 
Powered by phpBB® Forum Software