Hi everyone, this is my first post on the forum.
I don't have too much experience coding but I'm learning about dll creation in pb and I have a big doubt: if I have an array in the source code and somehow I pass the array pointer to a dll function as a parameter, can I re-dim that array from the dll?
I have a 0 sized array in the main code, and I need to generate float numbers inside a dll function, but I don't know how much numbers I need to return from there so I can't have the size predefined. Which would be the best way to do that?
I really spent time looking for dll realted questions but I can't find anything about that, thanks a lot for any clue!
Question about dll creation: arrays as parameter and answer
Re: Question about dll creation: arrays as parameter and answer
The memory management of the main programme and the DLL are separate. Thus arrays (DIM) do not have the same range.
Here it is better to work with pointers, structures and AllocateMemory.
Here it is better to work with pointers, structures and AllocateMemory.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive