Using EL/ PL SDK / DLL functions calling
Posted: Mar 20 2024
I have tried creating a DLL, and calling simple functions with values as parameters works fine. (This is without having to use the SDK/ using tskit.dll)
But i hit a problem with getting an array into a function.
Questions:
1. how can one pass an array into a function (without using the SDK dll)?
How should it be defined as a function parameter and what's the data type to be used for that parameter "external" declaration in PL?
I tried declaring myAverage (double* Data, int Len) with DWORD in "External" and
with
Arrays: _data[20] ();
myAverage (arrayStartAddr(_data), 10) doesn't give an error....but doesn't work properly.
2. EL Extension SDK manual doesn't have any reference to ArrayStartAddr (though it supposedly should)
So, what does ArrayStartAddr do and how should one use it?
3. IF passing an array be reference would not work, and one DOES have to pass an IEasyLanguageObject, then :
- should one use PLKit.dll ? or still a tskit.dll (where can one get it?)
- #import "....../PLKit.dll" - as is suggested in the EL SDK manual - in VS 2022 doesn't work.
thank you.
But i hit a problem with getting an array into a function.
Questions:
1. how can one pass an array into a function (without using the SDK dll)?
How should it be defined as a function parameter and what's the data type to be used for that parameter "external" declaration in PL?
I tried declaring myAverage (double* Data, int Len) with DWORD in "External" and
with
Arrays: _data[20] ();
myAverage (arrayStartAddr(_data), 10) doesn't give an error....but doesn't work properly.
2. EL Extension SDK manual doesn't have any reference to ArrayStartAddr (though it supposedly should)
So, what does ArrayStartAddr do and how should one use it?
3. IF passing an array be reference would not work, and one DOES have to pass an IEasyLanguageObject, then :
- should one use PLKit.dll ? or still a tskit.dll (where can one get it?)
- #import "....../PLKit.dll" - as is suggested in the EL SDK manual - in VS 2022 doesn't work.
thank you.