Article View: borland.public.cppbuilder.internet.socket
Article #2902Re: Unresolved external 'Idantifreeze::TIdAntiFreeze:
From: Liu Shan
Date: Fri, 06 Jan 2006 09:29
Date: Fri, 06 Jan 2006 09:29
125 lines
4511 bytes
4511 bytes
Very thanks.
> The link to the Development Snapshot is on the same page as 9.0.17.
I went to Development Snapshot page and download Indy 9 and install in
BCB6,it worked. but I cannot get the version number, only can see "Version
DevSnapshot", is it version 9.0.50?
New question
I wrote a server program that convert from Demo Pascal code and run on my
PC, but I cannot start server. If I run it by clicking F9, and set some
break point, it is very strange, the process will jump codes and go to the
end of function. see below code.
bool TfrmMain::StartServer()
{
TIdSocketHandle *Binding;
int i;
TStringList *SL ;
bool result, bChk;
result = false;
if (!StopServer())
{
fErrors->Append("Error stopping server");
result = false;
return result;
}
SL = new TStringList;
if (!SL) return false;
IdTCPServer->Bindings->Clear();
// bindings cannot be cleared until TidTCPServer is inactive
try
{
//=====================================================
// lbIPs is TCheckListBox that store two ip address
// 192.168.1.106
// 127.0.0.1
// I check 127.0.0.1 and select port number: 9999
//===================================================
for (i=0; i< lbIPs->Count-1; i++)
{
bChk = lbIPs->Checked[i];
if (bChk) // Cursor jump from here, below code not process
{
Binding = IdTCPServer->Bindings->Add();
Binding->IP = lbIPs->Items->Strings[i];
Binding->Port = StrToInt(edtPort->Text);
SL->Append("Server bound to IP " + Binding->IP + " on port "
+ edtPort->Text);
}
}
if (bChk) // Cursor jump from here, below code not process
{
IdTCPServer->Active = true;
result = IdTCPServer->Active;
fServerRunning = result;
lbProcesses->Items->AddStrings(SL);
if (result)
{
lbProcesses->Items->Append("Server started");
StatusBar->SimpleText = "Server running";
}
else
{
lbProcesses->Items->Append("Server stopped");
StatusBar->SimpleText = "Server stopped";
}
}
}
catch (Exception &exception)
{
lbProcesses->Items->Append("Server not started");
fErrors->Append(exception.Message);
result = false;
fServerRunning = result;
}
delete SL;
return result;
}
void __fastcall TfrmMain::btnStartServerClick(TObject *Sender)
{
int x,i;
x = 0;
for (i=0; i<lbIPs->Count; i++)
{
if (lbIPs->Checked[i])
x++;
}
if (x < 1)
{
ShowMessage("Cannot proceed until you select at least one IP to
bind!");
return;
}
fErrors->Clear();
if (!StartServer())
ShowMessage("Error starting server\t\t" + fErrors->CommaText);
else
ShowMessage("Server started successfully!");
}
run out of BCB, always get "Error starting server".
Please help, thanks.
Regards
Susan
Technical Details
Message-ID:
<43be37e8@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<43bcec76$1@newsgroups.borland.com> <43bd5f66$1@newsgroups.borland.com> <43bdcbd3$1@newsgroups.borland.com> <43bdd68e@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,a9ad1d742dfc75bf X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Liu Shan" <liushan@ps-electronic.com> From: "Liu Shan" <liushan@ps-electronic.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <43bcec76$1@newsgroups.borland.com> <43bd5f66$1@newsgroups.borland.com> <43bdcbd3$1@newsgroups.borland.com> <43bdd68e@newsgroups.borland.com> Subject: Re: Unresolved external 'Idantifreeze::TIdAntiFreeze: Date: Fri, 6 Jan 2006 17:29:11 +0800 Lines: 130 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 219.74.18.145 Message-ID: <43be37e8@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1136539624 219.74.18.145 (6 Jan 2006 01:27:04 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail