>I am testing the use of ComArray. So naturally I created a simple dll in visual basic. The VB code follows:
>
>Function comtest(a() As Double, b As Double, c As Double) As Double
> comtest = a(1) + b + c
>End Function
>
>I call this from vb, NO PROBLEMO. So I call the dll in VFP 7.0
>
>x= CREATEOBJECT('Paramtest.Arraytest')
>?COMARRAY(x,0) && Just need to pass by value
>Dimension array g(3)
>g(1) = 1
>g(2) = 2
>g(3) = 3
>x.comtest(@g,3,4,5) && Generates an ole exception
>
>I have tried different values for the second parameter of COMARRAY(). But nothing seems to work....... am I using COMARRAY incorrectly?
>
>Thanks,
>Dan
your use of comarray looks correct but
you're passing in more parameters than you have coded for
Insanity: Doing the same thing over and over and expecting different results.