Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing arrays to activex dll using ComArray
Message
From
28/10/2003 11:11:02
 
 
To
28/10/2003 11:03:24
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00843550
Message ID:
00843568
Views:
25
woops on me, too -
I believe for this to work correctly from VFP, the array parm needs to be a Variant instead of a Double

>woops, when I pasted the code it did not fit into the window on one line so I removed "d as double", and forgot to edit the line x.comtest(@g,3,4,5) to x.comtest(@g,3,4). But even with the parameters being correct, it still does not work.
>thanks,
>Dan
>
>>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) && Generates an ole exception
>>
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform