hello, i dont know if this is where i should post this, but would anyone know what would happen if i passed an array of doubles to a DLL and have the DLL resize it? i feel it may be possible but considering the DLL is written in c++ which doesnt actually know the size of the array, if i did resize it MQL5 would either not be able to use the size if its larger or it would simply crash.
To get around this would i just pass in an array that would be bigger than what id need and just pass back the "new size" and only look over the new size for the values?
If you allocate the array in Terminal and pass its reference to a DLL, then you cannot extend the array in the DLL - you would overwrite a memory managed by Terminal. Yes, you need to pass the additional in/out variable to specify the length of the array.
- fixdll.net
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hello, i dont know if this is where i should post this, but would anyone know what would happen if i passed an array of doubles to a DLL and have the DLL resize it? i feel it may be possible but considering the DLL is written in c++ which doesnt actually know the size of the array, if i did resize it MQL5 would either not be able to use the size if its larger or it would simply crash.
To get around this would i just pass in an array that would be bigger than what id need and just pass back the "new size" and only look over the new size for the values?