Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get an array from a com object?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00520366
Message ID:
00520492
Views:
20
Hi!

What about something like following:

lnArrayLength=loCOMOjbect.GetArrayLength()
dimension MyArray(lnArrayLength)
loCOMOjbect.GetArrayData(@MyArray)

in the GetArrayData do the ACopy to the array parameter passed by reference:

lparameters paArray
EXTERNAL ARRAY paArray
acopy(this.aResults,paArray)

Note that you cannot re-dimention the array passed by reference inside of the COM object, you require to prepare its dimension in the client program as shown above.

HTH.

>How can I get an array FROM a VFP DLL ?
>
>When I run my class (vcx) it works fine, but when compiled to a dll it doesn't seem to return an array.
>
>?acopy( loCOMOjbect.aResults, laMyArray)
>yeilds "Feature not available" error.
>
>Are there any work arounds?
>
>ComArray() is for passing arrays TO comobjects.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform