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:

>     Result := PAnsiChar(NotesList.Strings[0]);

You give a pointer to a string

>     NotesList.Delete(0);

And here you destroy the string you point to

> critical section code or not... I thought I might as the worker thread

You only need Critical section if you access same data from out different
thread context. So if this is not the case then you don't need it.

Was this clear to answer your questions?

mvg, Wilfried

To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to