>Stephane,
>
>I generally don't pass around arrays. Is the array small enough to pass as individual parameters? Or bundle into a single string? Ed Rauh may have something that might help. Using COM and a COMARRAY is another alternative.
>
There is a new FAQ up on UT at this point, FAQ#7979
Constructor for SafeArrays that documents how to convert a VFP array to a uniform datatype content array type known as a SafeArray; the code I posted (note, you'll need some of the UDFs from my ClsHeap class in the Files Section) will handle 32 bit integer arrays, 4 and 8 byte floating point numbers, Boolean (T/F) values, several flavors of string (BSTR, C-Strings of single-byte ASCII code, C-strings using UniCode) and BLOBs. It's all in VFP with calls to a couple of APIs, so other datatypes of SafeArrays can be handled with a minimum amount of modification to a DO...CASE used to specify how to form data of appropriate datatypes as documented in the MSDN Library.
It carries the usual Rauh warranty on source code modification - you break it, you own both pieces... < g >
>>Everything is working fine now thanks in part to your example (SpyIn). I do however have one more question to ask you: Is it possible to pass a FoxPro Array to a DLL? I went through the help files but the only parameter types allowed are INTEGER, SINGLE, DOUBLE, LONG and STRING.