OK, I have determined that I CAN pass an object to a COM exe. But I am running into a problem operating on the array property of the object.
I want my object that I'm passing to the COM exe to encompass all the arrays that I'm trying to avoid passing as parameters, as properties of the object. This is all fine and dandy, I can reference the object's properties (as arrays) and interrogate the properties one by one. But I cannot manipulate it in the COM exe the same way I can in the calling program.
I cannot do an ALEN() on it. The COM exe craps out there.
Based on the code below, does anyone see something that I may be missing? Why can I NOT do an ALEN inside of a VFP COM exe?
loComObject=CREATEOBJECT("ComPassObject.MyComObject")
loTest = CREATEOBJECT("Custom")
loTest.AddProperty("paCC[3,2]")
loTest.paCC[3,1] = "Hello WOrld"
MESSAGEBOX(loComObject.DoSomething(loTest))
DEFINE CLASS MyComObject AS Session OLEPUBLIC
PROCEDURE DoSomething
LPARAMETERS toArrayOne
LOCAL lnRetVal
** lnRetVal = toArrayOne.paCC[3,1] && this works
lnRetVal = ALEN(toArrayOne.paCC,1) && this doesn't
RETURN lnRetVal
ENDPROC
ENDDEFINE
TIA
Cathy
>I'm new to COM and don't know all the tricks yet.
>I know that I can pass arrays to and from a COM object but I have an application where depending on the calling function I will have anywhere from 2 to 8 arrays that I'll need to pass. It would just be easier to manage and maintain an object parameter.
>
>Thanks,
>Cathy
--
Cathy Ciciulla Neppel
Tenaska Marketing Ventures
Omaha, NE