Hello,
I wrote a dll in Lazarus to read a file (dxf file) and do few maths calculus and finally paint a bmp with the results of calculus. It runs on Windows 10.
To test the dll, I run a simply program (wrotten in Lazarus) that call dll functions and send it the file.
It's very strange, but if I try to run the dll with one file (FileA.dxf), the dll send an error of Write/Read in Memory.
If I run with other file (FileB.dxf), the dll run ok. After that, I could run the dll with first file (FileA.dxf) and runs ok. If I try to run again with second file (FileB.dxf) the dll fails.
If I check where the error appear, it's very strange because the error appear in a simple assignement of value to a local variable, for example:
str_a := str_b; where str_a and str_b are declared like local strings.
If I tested the dll with other program (wrotten in Delphi), it fails like with Lazarus program.
I don't know what I could do to be sure that the dll runs ok allways. I could have errors in calculus and dll fail, but I could check these errors and solve them, but if the dll fail like my description, it's impossible to build a dll and be sure that it runs.
Any idea about what is the fail?, something that I could check or do to aboid fails?
Thanks in advanage.