🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #4307

Re: Synchronize in Indy TIdThread

#4307
From: Roberto Zais
Date: Fri, 04 Mar 2005 15:25
97 lines
3924 bytes
Ok, it works fine !
Thanks a lot!
Roberto


"Omar E. Zelaya" <ozelaya2010@hotmail.com> ha scritto nel messaggio
news:42264b0c@newsgroups.borland.com...
> you can try commeting the following line on IdThread.hpp
> HIDESBASE void __fastcall Synchronize(const System::TMethod &Method)/*
> overload */;
>
> "Roberto Zais" <rzaiss@tiscali.it> wrote in message
> news:4225f42a@newsgroups.borland.com...
> >I am a bit worry  : I used Synchronize() in a TThread without problems :
I
> > defined the
> > procedure inside my specific  TThread class and there were no problems .
> > Now I do the same inside a TIdThread ( I saw some documentation: all
seem
> > to
> > allow it in the same way:
> > another chance is the syncronization class but I ' d prefer the same
> > way.. )
> > but  I get the error :
> >
> >
> > [C++ Error] Unit11.cpp(105): E2285 Could not find a match for
> > 'TIdBaseThread::Synchronize(void)'
> >
> > many thanks if you can help me
> > ciao
> > Roberto
> >
> > This is my code... (actually)
> >
> >
> > class TSMTPThread : public TIdThread
> > {
> >  typedef struct tagTHREADNAME_INFO
> >  {
> >    DWORD dwType;     // must be 0x1000
> >    LPCSTR szName;    // pointer to name (in user addr space)
> >    DWORD dwThreadID; // thread ID (-1=caller thread)
> >    DWORD dwFlags;    // reserved for future use, must be zero
> >  } THREADNAME_INFO;
> > private:
> > TIdMessage  *MyMsg;             // Message and  server SMTP encapsuled
> >                                                 // into the  thread
> > TIdSMTP *MyIdSMTP1;
> >
> >
> > protected:
> >        void __fastcall Run();
> > public:
> >        __fastcall TSMTPThread(bool CreateSuspended);
> >        void __fastcall Read_Edit_indirizzo_mail(void);
> >
> > AnsiString MessageText,temps;
> > AnsiString FFrom;
> > AnsiString FMessage;
> > AnsiString FRecipient;
> > AnsiString FSMTPServer;
> > AnsiString FSubject;
> > };
> >
> > void __fastcall TSMTPThread::Read_Edit_indirizzo_mail(void)
> >        {
> >        temps = timeinfo[turno_attuale-1].Edit_indirizzo_mail->Text;
> >        }
> >
> > void __fastcall TSMTPThread::Run()
> > {
> > //@@@  Run e' eseguito CONTINUAMENTE finche' non c'e' una unhandled
> > exception)
> >
> > if( sendmail_flag == true)
> >        {
> >        try{                            // si tenta il setup del modulo
> > TDIMessage
> >
> >        MyMsg->Clear();
> >        MyMsg->CharSet = "Windows-1251";
> > /* ALL to synchronize...
> >        MyMsg->From->Name =  Form13->Edit1->Text;
> >        MyMsg->From->Address = Form13->Edit2->Text;
> >        MyMsg->Sender->Name =  Form13->Edit3->Text;
> >        MyMsg->Sender->Address =  Form13->Edit4->Text;
> > */
> > // first try :
> >        Synchronize(Read_Edit_indirizzo_mail);          //<--!!!!!
> > compilation ERROR
> >       (...........)
> >
> >
> >
>
>
Technical Details
Message-ID: <42287dc7@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <4225f42a@newsgroups.borland.com> <42264b0c@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,c27f0c18631b8711
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Roberto Zais" <rzaiss@tiscali.it>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <4225f42a@newsgroups.borland.com> <42264b0c@newsgroups.borland.com>
Subject: Re: Synchronize in Indy TIdThread
Date: Fri, 4 Mar 2005 16:25:38 +0100
Lines: 99
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1478
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478
NNTP-Posting-Host: 82.48.83.225
Message-ID: <42287dc7@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1109949895 82.48.83.225 (4 Mar 2005 07:24:55 -0800)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail