codenavigator
Programmer
I need to call an ActiveX object function from VFP 6.0. The function declaration is:
HRESULT PresetMultipleRegisters([in] short Addr, [in] long DataStart, [in] short Quantity, [in] VARIANT vRegValues)
In VB the syntax that works is:
where array is a declared as type Long.
In VFP I have tried passing the array as a value and as a reference:
However, both statements produce an OLE error, "Error building array".
What is the correct way to pass the array argument?
HRESULT PresetMultipleRegisters([in] short Addr, [in] long DataStart, [in] short Quantity, [in] VARIANT vRegValues)
In VB the syntax that works is:
Code:
<object>.PresetMultipleRegisters(1,4,3,array)
where array is a declared as type Long.
In VFP I have tried passing the array as a value and as a reference:
Code:
(1) <object>.PresetMultipleRegisters(1,4,3,array)
(2) <object>.PresetMultipleRegisters(1,4,3,@array)
However, both statements produce an OLE error, "Error building array".
What is the correct way to pass the array argument?