I found two places in the DLL's files where I use string operations like that, removed the INLINE and those sections of code now works but I still have corrupted data in other parts of the files and doing that same type of code with dynamic arrays of byte seems to work ok using the inline so I am still on a search for the remaining errors.
To recap on the case, these files work perfectly with 3.0.4. I switched to using inline coding because my older Delphi compiler didn't have that so when I switched to fpc I had to do some coding in an attempt to speed up the execution time because that was one of the items I noticed was slower than Delphi's code.. I used the Delphi DLL's for a while with Lazarus then fully compiled over to fpc because I wanted to keep is fully fpc code compliant .