Now the Delphi 2010 test program crashes on finishing when I compile the DLL using Lazarus, but that is another issue
Because there is a difference between size of type Char. Delphi 2009 and higher uses 2 byte per one symbol in String. FreePascal - always 1 byte.