__comobject

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Ariel Gimenez (arielgimenez_at_--sacar--esto--yahoo.com)
Date: 02/10/04


Date: Tue, 10 Feb 2004 17:04:00 -0300

Hi
Im using a dll made in VB 6.0
this dll exposes a weird collection, from a program in VB 6.0 it was
accessed this way:

result = instance_dll.collection(1).property1
result = instance_dll.collection(1).property2
...

now within c# im accessing it this way:

//take the collection
VBA.Collection collection = (VBA.Collection) instance_dll.collection;
//trash is the only way i found to access the damn collection
object int_temp = 1;

object myObject = (object) coleccion.Item(ref int_temp);

Now i have the first part but... how can i access the other properties?
when i see this object in the watch it appears as system.__comobject

thanks in advance!