I need to create an array of strings in a DLL then call the array from a PBasic Console programme. Embarrassed to say I can't find any help on the method.
The array in the DLL might look something like:
SUB GetArr(BYVAL FirstElement AS DWORD, Total AS LONG) EXPORT
DIM A() AS STRING
DIM i AS LONG
DIM t AS LONG
t = 3
REDIM A(1 TO t) AS STRING AT FirstElement
FOR i = 1 TO t
A(i) = STR$(i)
NEXT i
Total = t ' (?)
END SUB
If the SUB is in error, please let me know. If not, how do I actually load the array into a PBCC program array? Any help gratefully received.
The array in the DLL might look something like:
SUB GetArr(BYVAL FirstElement AS DWORD, Total AS LONG) EXPORT
DIM A() AS STRING
DIM i AS LONG
DIM t AS LONG
t = 3
REDIM A(1 TO t) AS STRING AT FirstElement
FOR i = 1 TO t
A(i) = STR$(i)
NEXT i
Total = t ' (?)
END SUB
If the SUB is in error, please let me know. If not, how do I actually load the array into a PBCC program array? Any help gratefully received.
Comment