Article View: borland.public.cppbuilder.internet.socket
Article #4288Re: Synchronize in Indy TIdThread
From: Omar E. Zelaya
Date: Wed, 02 Mar 2005 23:24
Date: Wed, 02 Mar 2005 23:24
86 lines
3594 bytes
3594 bytes
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:
<42264b0c@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<4225f42a@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 Reply-To: "Omar E. Zelaya" <ozelaya2010@hotmail.com> From: "Omar E. Zelaya" <ozelaya2010@hotmail.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <4225f42a@newsgroups.borland.com> Subject: Re: Synchronize in Indy TIdThread Date: Wed, 2 Mar 2005 17:24:42 -0600 Lines: 88 Organization: Insoftware X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 63.245.8.17 Message-ID: <42264b0c@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1109805836 63.245.8.17 (2 Mar 2005 15:23:56 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!news.maxwell.syr.edu!newsfeed.frii.net!newsfeed.frii.net!news.compaq.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail