Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP3
Message
From
06/07/1999 21:13:13
 
 
To
06/07/1999 15:42:41
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: SP3
Miscellaneous
Thread ID:
00237725
Message ID:
00238055
Views:
10
>>>
>>>Yes, Dimension of passed arrays is working now but is not for passed object's array property.
>>>Mark
>>
>>
>>Hmm... did that ever work? Was it ever supposed to?
>>
>>You could create a method of the Class that you are passing which will resize the array for you.
>>
>>lparamaters oRef
>>
>>oRef.SizeMyArray(100)
>>
>>for x= 1 to 100
>> oRef.MyArray[x] = 'whatever'
>>next x
>>
>>How are you doing it... like this?
>>
>>dime oRef.MyArray[100]
>>
>>and that doesn't work? Does it give you an error?
>>
>>BOb
>Yes, it works in that way. What I am trying to do is this:
>*!* COM server's method
>LPARAMETERS toParm
>
>lnCount = ADIR(laArr, '*.*')
>IF lnCount > 0
> toParm.AddProperty('paFiles(lnCount, 5)')
> =ACOPY(laArr, toParm.paFiles) && does not work - hangs right here
>ENDIF
>Looping is forking but takes too much time ...
>Mark

So... does the array property get added with the ciret dimensions but the acopy doesn't work?

Are you sure you are using COMARRAY() on your COM object prior to passing the object reference? I know you aren't directly passing the array, but you are passing an array property of the object to the COM object.

What if you pass the object AND an array from the client... then you can acopy back in the client...
* client....

oX = createobject('myserver.myclass')
commarray(oX, 11)

dime laArr[1]

lnCount = oX.DoMethod( this, @laArr )

if lnCount > 0
   acopy(laArr, this.paFiles)
endif

return

*****************

* com method...

LPARAMETERS toParm, laArr

lnCount= adir(laArr,'*.*')
return lnCount
Not sure what else in the object you need to reference... but, this should work and eliminate the need to loop through and populate the array over COM... although it is happening in aDir.

If you want something a bit speedier, you may want to create a string of the adir info somehow, and then parse it back into the array in the client. This would probably go ALOT faster if you are accessing your COM server on another machine.

BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform