DLL Array passing

 

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?

 
I am not a coder sorry ... I hope someone else will reply ...
 
Connor Fitz:

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.

 
As a saw your problem you didn't pass a reference to a dll  file that's why you are facing this problem. Another reason is that it may be happen the dll file is not considering the actual size of array. As per my suggestion first you resize it and then your problem will be definitely fix.I will provide a link  https://fixdll.net/mcvcp120 you can install it and your concern sure dissappear.
Acadficn16.Dll
  • fixdll.net
What is Acadficn16.dll Acadficn16.dll is a dll file also known as acadficn, This file is developed by Autodesk, Inc. Acadficn16.dll is a part of AutoCAD. Download Acadficn16.dll DOWNLOAD FILE DOWNLOAD ZIP  … Read more » What is Acgex16.dll This file is developed by Autodesk, Inc. Acgex16.dll is a part of Autodesk, Inc. ObjectDBX. Download...
Reason: