G
Guest
I am trying to use a COM object which has a parameter of type Collection in
VB6. .Net recognizes this collection as a VBA.Collection object. When I try
creating a VBA.Collection in .Net using:
Dim objColl As New VBA.CollectionClass()
I get the following error:
An unhandled exception of
type 'System.Runtime.InteropServices.COMException'
occurred in WindowsApplication4.exe
Additional information: COM object with CLSID {A4C4671C-
499F-101B-BB78-00AA00383CBB} is either not valid or not
registered.
If I try passing a .Net Collection for example:
Dim objColl As New Collection()
Dim objZip As New CILZip.CIZipClass()
objColl.Add("C:\test.xml")
objZip.Archive(objColl, "c:\Test.zip")
I get the following error when I call the COM object:
An unhandled exception of
type 'System.InvalidCastException' occurred in
WindowsApplication4.exe
Additional information: Specified cast is not valid.
Am I overlooking something or is a collection a
unsupported type of interop?
VB6. .Net recognizes this collection as a VBA.Collection object. When I try
creating a VBA.Collection in .Net using:
Dim objColl As New VBA.CollectionClass()
I get the following error:
An unhandled exception of
type 'System.Runtime.InteropServices.COMException'
occurred in WindowsApplication4.exe
Additional information: COM object with CLSID {A4C4671C-
499F-101B-BB78-00AA00383CBB} is either not valid or not
registered.
If I try passing a .Net Collection for example:
Dim objColl As New Collection()
Dim objZip As New CILZip.CIZipClass()
objColl.Add("C:\test.xml")
objZip.Archive(objColl, "c:\Test.zip")
I get the following error when I call the COM object:
An unhandled exception of
type 'System.InvalidCastException' occurred in
WindowsApplication4.exe
Additional information: Specified cast is not valid.
Am I overlooking something or is a collection a
unsupported type of interop?