>>>>>As I understand it the limitations encountered are related to the general architecture of VFP6 and that is why they won't be changed in this version. For example, the internals of VFP would need to be greatly modified to change the way VFP handles arrays in order to allow safearrays.
>>>
>>>How about illuminating some of us... What is a safe array? And, if you are using VFP to talk to a VFP com object, why do you need to use them?
>>>
>>>BOb
>>
>>Obviously, it's an array that isn't dangerous, BOb :-)
>
>OH... I thought it was...
>
>1. An array that was wearing protection
>
>2. An array that didn't want to make a comitment
>
>Thanks for the info.
>
>BOb
A safearray is what you use to keep a large valuable object thats to big to fit in just one safe.
Actually, as we all know, C++ stongly types variables, unlike VFP that allows us to change a variable type at will at run time. A safearray allows an array to contain various data types instead of being only short ints, chars, etc. MS recommends using safearrays to pass data between COM objects and therefore many(or at least the ones I must interact with) component builders specify using them. For example, for an application I am building for a client, I have to call methods on servers written in C++ that require one or more pointers to safearrrays of chars that the method will redimension and fill with bytes as a way of my getting the data from the server. Example:
DIME myarray1[1]
DIME myarray2[1]
oServer = CreateObject("thirdparty.serverclass")
nRetVal = oServer.GetData(nKey,@myarray1,@myarray2)
VFP5 just won't do that. It can receive a safearray from a C++ or VB client just fine but I can't call servers the same way. VFP6 claims to allow passing arrays to COM objects by ref with COMARRAY(). I tried it and was unable to pass an array to a server expecting a safearray. I hope that either I did something wrong or that the release version will support safearrays.
Gary Foster
Pointsource Consulting Inc.
gary_foster@starkey.com