Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ARRAY() command in Visual Basic
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00518091
Message ID:
00518299
Views:
9
>>I am converting a Visual Basic routine to VFP. I need to send four parameters to an object oriented application. The Visual Basic routine uses the ARRAY() command like this:
>>
>>myParams=ARRAY("0p0","0p0","18p0","18p0")
>>myTFrame.GeometricBounds=myParams
>>
>>When I use the DIMENSION command to create a 1 dimension array, and then populate the array with the values given above, the application chokes. Is there a way in VFP to mimic the ARRAY() command in VB?
>>
>>Thanks in advance...
>>
>>John Dennis
>
>John,
>Unfortunately, no. The ARRAY() function creates a SAFEARRAY. For a defintion of what a SAFEARRAY is, check out this MSDN topic. http://msdn.microsoft.com/library/psdk/automat/chap7_9ntx.htm
>
>IAC, VFP does not create SAFEARRAYs so you can not assign a VFP array to something that is supposed to be an array property and have it work. If there was a method that took an array as a parameter, it would work because the array would be converted to a SAFEARRAY going through the COM barrier. But that doesn't look like the case here.

>
>AFAIK, unless there is another interface to this property (e.g. method to set it), you won't be able to use this property with VFP.

Larry,

Will Ed's Constructor for SafeArrays work?
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform