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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Array parameter to ActiveX control

Status
Not open for further replies.

NutsAndBolts

Programmer
Oct 6, 2003
3
ZA
Someone must have done this before - can you let me know please how ???

I need to pass a (dynamic) array of doubles (floating point values) from the host application (VB / Access 2000) to an ActiveX control which I have written in Delphi. The existing methods and event are all working fine.

But I cannot get compatible data types between VB and the type library in Delphi

In Delphi, I have tried setting the type of the array (in the type library editor) to SAFE_ARRAY, and passing the parameter in VB like this :

Dim Points () as Double
Redim Points (5)
Points (1) = 12.34 ' etc etc for 2, 3, 4, 5
Call Control.Method (Points)

but it gives an error "type mismatch" when I run the procedure in VB

There must be a simple solution - your help would be appreciated, thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top