Article View: borland.public.cppbuilder.internet.socket
Article #1433Re: TidTCPServer and disconnections problems
From: Stefano Bonifazi
Date: Tue, 16 Jan 2007 14:34
Date: Tue, 16 Jan 2007 14:34
47 lines
2723 bytes
2723 bytes
THANKKK UUU!!! :))
Now my work can go on :))
Remy Lebeau (TeamB) wrote:
> Then you likely have a third-party debugger running that is
> intercepting the exception before the application is. Under normal
> circumstances, that will NOT happen. TIdTCPServer handles uncaught
> exceptions internaly.
I dunno if Microsoft Developer Studio .NET did! .. it is so overbearing!
> Make sure that you set the ThreadClass property BEFORE the server is
> activated. Do not set the server to Active=true at design-time.
Yes exactly there was the problem I set the servrr active at design time :(
>
> Use static_cast instead of reinterpret_cast.
what does it change?
> TUpdateData is a TIdSync-derived class. You cannot construct it on
> the stack like that. VCL-based objects must be constructed on the
> heap only. That is a requirement of the VCL runtime. In fact, the
> C++ compiler can produce invalid code if you try to use VCL objects on
> the stack.
well I copied some code snippet.. without thinking of that matter at
all! Thanks!
>
>> void __fastcall DoSynchronize()
>> {
>> TNodzClientThread*
>> pNodzThread=reinterpret_cast<TNodzClientThread *>(this);
>
> Why are you doing that? TUpdateData has no relation to
> TNodzClientThread at all. You can't cast one to the other like that.
> I suspect you meant to cast the Thread property instead, correct?
>
> TNodzClientThread* pNodzThread = static_cast<TNodzClientThread
> *>(this->Thread);
Yes :)) I copied the wrong code .. sorry U are right!
Thank U very much again!
Best regards!!
Stefano B.
Technical Details
Message-ID:
<45ace260@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45a7f92c@newsgroups.borland.com> <45a803d7$1@newsgroups.borland.com> <45a8c3c4@newsgroups.borland.com> <45ac8ecd$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,827d16ab792ef887 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 16 Jan 2007 15:34:32 +0100 From: Stefano Bonifazi <stefboombastic@email.it> User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: TidTCPServer and disconnections problems References: <45a7f92c@newsgroups.borland.com> <45a803d7$1@newsgroups.borland.com> <45a8c3c4@newsgroups.borland.com> <45ac8ecd$1@newsgroups.borland.com> In-Reply-To: <45ac8ecd$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 80.104.236.124 Message-ID: <45ace260@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1168958048 80.104.236.124 (16 Jan 2007 06:34:08 -0800) Lines: 47 Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail