Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COM, objects, parameters, and arrays
Message
De
12/11/1998 16:53:29
Eric Barnett
Barnett Solutions Group, Inc
Sonoma, Californie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
COM, objects, parameters, and arrays
Divers
Thread ID:
00157192
Message ID:
00157192
Vues:
64
I've run in to a little problem with COM, objects, and arrays.

Here's the scenario:

I've played around with passing arrays to COM objects, and much to my pleasant surprise, COMARRAY() works as adverstised. So I can say,

oCOM=CREATEOBJECT("mydll.myobject")
=COMARRAY(oCOM,11)
oCOM.populatearray(@myarray)

and myarray will be passed by reference and manipulatable.

HOWEVER,

say I have the following scenario:

I have an object with property myarray(1) from class myclass.

oMyObject=CREATEOBJECT("myclass")
oCOM=CREATEOBJECT("mydll.myobject")
oCOM.populateobject(oMyObject)

oMyObject is of course passed by reference, which is good. But oMyObject.myarray(1) is not seen by the COM object as an array - it seems to be passed by value. Trying to redimension the array of course causes an error. And COMARRAY of course is useless here since I'm not passing an array explicitly by reference.

Any one have any ideas or is this hopeless?
Eric Shaneson
Cutting Edge Consulting
Répondre
Fil
Voir

Click here to load this message in the networking platform