[fpc-devel] interfaces vs classes in dll

Daniël Mantione daniel.mantione at freepascal.org
Fri Nov 30 10:56:11 CET 2007



Op Fri, 30 Nov 2007, schreef Martin Schreiber:

> On Friday 30 November 2007 10.26, Michael Van Canneyt wrote:
> >
> > When you pass an interface that uses ansistrings to a DLL,
> > the ansistrings in it (or referenced by it) may be disposed
> > of by the wrong memory manager.
> >
> > Since I assume the DLL use is the scenario that is wanted,
> > it de facto means that you must use widestrings.
> >
> Please remember that widestrings on Linux *are* reference counted. I don't 
> know about other UNIX like platforms.

Most of the time people just want to pass ansi/wide strings across DLL's 
without operating on them. An open array of char/widechar is a comfortable 
mechanism to pass those strings accross DLL boundaries.

Daniël


More information about the fpc-devel mailing list