Re: [twsocket] DLL implementation advice (or example)...

2011-09-15 Thread Wilfried Mestdagh
Hi Adam, despite tearing out some hair and losing a Hopefully you have spare :) Result := PAnsiChar(NotesList.Strings[0]); NotesList.Delete(0); The problem is that you give a pointer to the return value of that function to something that not exists anymore after the functions exit:

Re: [twsocket] DLL implementation advice (or example)...

2011-09-15 Thread Adam Burgoyne
Hi, Wilfried - thanks for the explanation - I've been looking at the code for hours and just couldn't see the cause. I've now changed the code to this which should solve the problem if I understood correctly: function ReadMessage: PAnsiChar; stdcall; var Note: AnsiString; begin