Jonas Maebe wrote:

On 9 dec 2005, at 16:03, Marc Weustink wrote:

Before we can say something, what functions do you call, what params, what calling convention etc. Does it happen in one specific sequence of calls, to specific functions/methods etc.

Please provide some more info.


http://www.freepascal.org/bugs/showsource.php3?ID=4538

Whoops, I didn't saw that there was a bugrep.

I'm not shure if FPC behaves the same as Delphi, but I think it does.

In Delphi you cannot exchange ansistrings between dlls, unless you have a shared memory manager. Normally each exe (or dll) has its own memory manager. So when you pass a string to a dll and it it goes out of scope there (since it is changed) it is released there. So a allocated memory block from one manager is freed in another. This gives all kinds of unexpected errors at strange places.

IIRC the way constant strings are allocates it changed, so that may be the reason that you didn't see the error on dlls generated by an older fpc.

Marc

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to