Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
VFP/COM - passing objects to COM objects
To All,
In VFP I can create an object and pass it as a parameter to some
Object.Method(), whereupon the called Object.Method() can check the values
of properties of the passed object in order to do its job. The called
Object.Method() can also AddProperty() new properties and update the values
of existing properties, whereupon those property values are visible/updated
in the calling code. IOW, objects are passed by reference.
My question is whether the same holds true when the Object.Method() is a
method of a COM object -- if the COMObject.Method() updates/adds properties
of the passed object, does the VFP calling code see the new/updated
properties? Even if the COMObject is not written in VFP? And how about
the reverse -- if a VB object/application creates an object, passes it as a
parameter to a VFP COMObject.Method(), are property value updates and new
properties added via AddProperty() in the VFP COMObject.Method() seen by
the VB object once the VFP COMObject.Method() completes?
Thanks for any insight,
Ed Lennon
SUI
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement