Announcement

Collapse
No announcement yet.

Passing Array to DLL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing Array to DLL

    Hello:

    I'm building a DLL in Delphi to be called from EFS and I am stumped on how to deal with passed arrays on the Delphi side of things (I'm not having any problems passing doubles or ints... just arrays).

    I am using d.Add in EFS as follows:

    d.Add("Test", DLL.DOUBLE, DLL.STDCALL, "TestFunction", DLL.DOUBLEARRAY);

    so I'm passing an array of doubles to the DLL and the DLL will perform its calculations and return a double value. But I'm not clear on how to define the array parameter on the Delphi side of things. Is this array being passed as a Variant, a SafeArray, an array of Double, an array of PDouble or something else entirely?

    If anyone could provide a code snippet or example, in either C, Delphi or VB it would be greatly appreciated.

    Thanks,

    Chris
Working...
X