unit DispatchNotifierServerMain; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, uROClient, uROBINMessage, uROClientIntf, uROServer, uROIndyHTTPServer, uROIndyTCPServer, SyncObjs, uROPoweredByRemObjectsButton; type TDispatchNotifierServerMainForm = class(TForm) ROMessage: TROBINMessage; ROIndyTCPServer: TROIndyTCPServer; Memo: TMemo; ROIndyHTTPServer: TROIndyHTTPServer; ROPoweredByRemObjectsButton1: TROPoweredByRemObjectsButton; procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); private CriticalSection: tCriticalSection; public procedure Log(const someText: string); end; var DispatchNotifierServerMainForm: TDispatchNotifierServerMainForm; implementation {$R *.DFM} procedure TDispatchNotifierServerMainForm.Log(const someText: string); begin CriticalSection.Enter; try Memo.Lines.Add(someText); finally CriticalSection.Leave; end; end; procedure TDispatchNotifierServerMainForm.FormCreate(Sender: TObject); begin CriticalSection := TCriticalSection.Create; end; procedure TDispatchNotifierServerMainForm.FormDestroy(Sender: TObject); begin CriticalSection.Free; end; end.