Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-05 Thread Jonas Maebe
On 05 Jan 2006, at 01:33, L505 wrote: With Cmem, and according to my current knowledge, Cmem should allow one to safely export strings from one Pascal program to another Pascal program (but only Pascal programs, or programs who have compatible reference counting - i.e. maybe Delphi). Onl

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-04 Thread L505
> i learned a few things from here: > > http://velthuis.homepage.t-online.de/articles/articles-pchars.html > http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_howto5 > I have seen Rudy's article too, and am reading the other website now, though. I'm at the point where I feel 100 percent confi

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread eduard stefan
Hello L505, Tuesday, January 3, 2006, 4:30:23 AM, you wrote: > Trustmaster from PSP project tells me he's been using Ansistrings in DLL > without > problems. The entire psp.furtopia.org website is running a DLL with > ansistrings in > it, he says. > ... > Can it be something in FPC 1.0 compiler

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
> simple and small unit. Advantages over sharemem are with cmem you wouldn't > have to > ship sharemem.dll with the application. > In fact, if someone has not already done it, the cmem.pp unit could be converted for use with delphi too (cmem.pas), since no one enjoys shipping sharemem dll. I w

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
> > If a Pascal program returns a reference counted type to a C library, > then you get a memory leak, sharemem/cmem or not. If a C program > passes a pchar to a function that expects an ansistring, you can get > any sort of behaviour ranging from no problem to program crashes > (which is logical,

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread Jonas Maebe
On 03 Jan 2006, at 18:49, L505 wrote: A very easy way to solve all problems in FPC is to simply use the cmem unit in the dll(s) and in your main program. It should have the same effect as Delphi's sharemem unit. Would that work with C programs that called a library? I think sharemem only wo

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
> > On 03 Jan 2006, at 18:29, L505 wrote: > > > I can post the psp 1.0 sources online if anyone is interested, but > > probably it is > > only me who is so curious ;-) > > A very easy way to solve all problems in FPC is to simply use the > cmem unit in the dll(s) and in your main program. It shou

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread Jonas Maebe
On 03 Jan 2006, at 18:29, L505 wrote: I can post the psp 1.0 sources online if anyone is interested, but probably it is only me who is so curious ;-) A very easy way to solve all problems in FPC is to simply use the cmem unit in the dll(s) and in your main program. It should have the sa

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
> L505 wrote: > > Can it be something in FPC 1.0 compiler that allowed this to happen? I > > guess I'll > > have to do more digging. I wish I could put an end to this and just use > > Pchars in > > these DLL situations - but there's always some evidence of ansistrings > > working, > > somewhe

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
> On Mon, 2 Jan 2006, L505 wrote: > > > Trustmaster from PSP project tells me he's been using Ansistrings in DLL > > without > > problems. The entire psp.furtopia.org website is running a DLL with > > ansistrings in > > it, he says. > > > > He says he compiled it with FPC 1.0 a long time ago.. >

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread Michael Van Canneyt
On Mon, 2 Jan 2006, L505 wrote: Trustmaster from PSP project tells me he's been using Ansistrings in DLL without problems. The entire psp.furtopia.org website is running a DLL with ansistrings in it, he says. He says he compiled it with FPC 1.0 a long time ago.. So the psp.furtopia website

Re: [fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread Micha Nelissen
L505 wrote: Can it be something in FPC 1.0 compiler that allowed this to happen? I guess I'll have to do more digging. I wish I could put an end to this and just use Pchars in these DLL situations - but there's always some evidence of ansistrings working, somewhere. There is an important diff

[fpc-pascal] Ansistrings exported in DLL's - mystery

2006-01-03 Thread L505
Trustmaster from PSP project tells me he's been using Ansistrings in DLL without problems. The entire psp.furtopia.org website is running a DLL with ansistrings in it, he says. He says he compiled it with FPC 1.0 a long time ago.. So the psp.furtopia website has been using ansistrings in DLL for