Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Arrays to ActiveX Objects

Status
Not open for further replies.

codenavigator

Programmer
Jun 14, 2002
14
US
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:

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, &quot;Error building array&quot;.

What is the correct way to pass the array argument?


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top