>>Hello All
>>
>>I am trying to use OLE to automate a 3rd party application. Everything works fine except a single function call that requires some variables to passed by reference. Here is the example:
>>
>>Function Retrieve(ByVal Count As Long, ByRef Date As Variant, ByRef Open As Variant, ByRef High As Variant, ByRef Low As Variant, ByRef Close As Variant, ByRef Volume As Variant, ByRef OpenInt As Variant) As Long
>>
>>
>>No matter what variable type I pass I always get a "type mismatch" error message. I contacted their support department who came back with this response:
>>
>>This function requires that the language from which you are calling it
>>supports SAFEARRAY data type that is used by Retrieve to return data.
>>Visual Basic for Applications can do that. C++ can do that.
>>Scripting languages (JScript/VBScript) don't offer this data type.
>>>>So my question - is there a way to handle this in VFP9?
>>
>>TIA
>
>
>Something like:
>
>oTestCOM.Retrieve(1, @SomeVar1, @SomeVar2,;
> @SomeVar3, @SomeVar4,;
> @SomeVar5, @SomeVar5,;
> @SomeVar6)
>
No this doesn't work. No matter what the "SomeVar" variables are. It has something to do with passing what the support guy calls "SAFEARRAY" data type ?
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.