DEFINE Class pm As session OlePublic oTables = Null PROCEDURE getListeTables () *LOCAL oTables AS Collection oTables = CREATEOBJECT("Collection") FOR i=1 TO ADIR(laList, "h:\temp\*.DBF") oTables.Add(laList[i,1]) ENDFOR RETURN oTables ENDPROC ENDDEFINE ... o = CREATEOBJECT("mydll.pm") oTables = o.getListeTables() ? oTables.Count FOR EACH lcTable IN oTables && Crash here ? (lcTable) ENDFOR>I have a method in my EXE COM that return a collection object. The call works well, but VFP crash when I try to access the collection in a FOR EACH loop.
loTables = loBuz.getListeTables (tcRepPrinc) && Return an object > >FOR EACH lcTable IN loTables && Crash here > THISFORM.lstTablesDisp.AddItem (lcTable) >ENDFORAny ideas?
FOR I = 1 TO loTables.Count > THISFORM.lstTablesDisp.AddItem (loTables.Item (I)) >ENDFORTIA