Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP Equilalent to VB Collection Object
Message
From
11/05/1999 18:15:51
 
 
To
10/05/1999 15:36:54
Bob Lucas
The WordWare Agency
Alberta, Canada
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00216845
Message ID:
00217512
Views:
18
Thanks, I think I will play with your suggestions
for awhile. Sounds like an easier solution then using
collection objects in VB.

>VFP doesn't provide the functionality of returning objects or using objects as parameters to COM objects.
>
>However, you can pass arrays to a COM object. The array should be redimensioned from the calling program to the appropriate size (the COM object cannot resize it and will cause severe problems if it attempts to redimension the array). You can use properties of the COM object to determine the size of the array required to hold the data.
>
>For instance:
>
>LOCAL ox, lnsize
>ox = CREATEOBJECT("comobject.comclass")
>COMARRAY(ox, 11)
>
>*-- the object knows how many items are required for the 'collection array'
>
>lncols = ox.ncols
>lncount = ox.ncount
>DIMENSION temparray(lncount, lncols)
>
>*-- transferdata is the COM method that will populate
>*-- the passed by reference array with the data
>ox.transferdata(@temparray)
>
>*-- temparray now has the 'collection items' from the COM Object
>
>RELEASE ox
>
>
>
>>Is there an equivalent object in VFP
>>to VB Collection data type?
>>
>>I want to return data from a COM object
>>in VFP by way of a Collection like in VB.
>>
>>If there isn't, how do you return data
>>from a VFP Com object?
Previous
Reply
Map
View

Click here to load this message in the networking platform