>Well, as I understand funtion DoubleToNum it converts data to valid double one before calling DLL. The following is the code I use:
>
>set proce to clsheap addi && Ed clsheap class
>
>ascmx = replicate(chr(0),8*10)
>xdata =DoubleToNum(ascmx) && Is this OK ?
>
>retval=MyDll(,,@xdata)
>
>The C0000005 error appear after that.
>
>Must I convert LONG data type too?
>
>
>Thanks.
>
>Alejandro Fernandez
Alejandro,
I think you got it wrong. In order to pass an array of doubles, first each double should be converted to string then concatanated. On return string is parsed and converted to num :
dimension myDoubles[6]
myDoubles[1] = 19292.3773
myDoubles[2] = 1929243234343
...
lcDoubleParm = ''
for ix=1 to alen(myDoubles)
lcDoubleParm = lcDoubleParm + CopyDoubleToString(myDoubles[ix])
endfor
dimension myRetDoubles[nDoubles]
for ix=1 to nDoubles
myRetDoubles[ix]=DoubleToNum(substr(lcDoubleParm, (ix-1)*8+1, 8))
endfor
Cetin