[Lazarus] Accessing WinControls from DLL

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Jun 16 08:32:37 CEST 2010


On Wed, 16 Jun 2010 12:34:11 +0930
SteveG <steveg at nevets.com.au> wrote:

> I believe that 'writing' (without syncronization) to a TWinControl from 
> a thread or dll function is BAD(tm), but just wondering if the same 
> applies to 'reading' (properties / etc) ?
> 
> another way - can 'non-mainthread' access to WinControls be considered 
> 'ReadOnly'

In general: no
Apply the normal multithreading rules. You have to make sure the main
thread does not write at the same time. 

Mattias




More information about the Lazarus mailing list