To further clarify my problem, the function apparently failing is simply. Result := PlayView.Items.Count;
Even with the VCL being non thread safe, is a function like this likely to cause a crash if accessed simultaneously by 2 threads? Thanks, Ross. From: Ross Levis [mailto:[EMAIL PROTECTED] Sent: Monday, 17 March 2008 7:38 p.m. To: 'Borland's Delphi Discussion List' Subject: message handling from threads My app provides an API for plugin DLL's to request information via a SendMessage and return data to the DLL. I'm confused as it whether this is thread safe as far as the VCL is concerned. A plugin developer is complaining of the occasional crash from a one line function that returns the number of items in a listview. I have a message handler class created in the app, unrelated to the main form, and I'm using a modified AllocateHWnd which allows me to specify a window class name for DLL's to use FindWindow to locate. If a thread in the DLL sends a message, is my app responding from it's main thread or not? I thought it would be but perhaps not which would explain the occasional crash. Many thanks, Ross. _______________________________________________ Delphi mailing list -> [email protected] http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

