🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Strange problem when using Indy 9 ftp/http

#2213
From: David Ayre
Date: Thu, 20 Jul 2006 13:04
54 lines
2380 bytes
Hi,
I have at last got my application working using http component
and it works fine on my computer. However, I have discovered an
odd qhirk in its operation on other computers.
When I run the application, it brings up a form on which there are
TLabels onto which I put messages to say what is happening.
The application then downloads a file from my website. However,
what happens on other computers is that the form appears and
remains blank until I move the mouse pointer over it. Then it
springs into life.
Any idea what I have done wrong?
This is the relevant code:-

	char acFile[256];
	char acPath[256];  
	char acDest[256];
	char acVersion[64];
	char acIniFile[256];

	GetPrivateProfileString("PATHS","DATA","s:\\mtdata",acPath,sizeof(acPath),".\\paths.ini");
	Application->HandleMessage();
	ListBox1->Clear();

	sprintf(acIniFile,"%smtrader.ini",acPath);
	GetPrivateProfileString("VERSION","NUMBER","000001",acVersion,sizeof(acVersion),acIniFile);
	int iOldVersion = atoi(acVersion);

	strcpy(acFile,"version.ini");
	sprintf(acDest,"%s%s",acPath,acFile);
	remove(acDest);
	char acCaption[128];
	sprintf(acCaption,"Downloading %s",acFile);
	Label1->Caption = acCaption;

	TFileStream *SL = new TFileStream(acDest,fmCreate);
	try
	{
		try
		{
			IdHTTP1->Get("http://www.selectdata.co.uk/FML/version.ini",SL);
		}
		__finally
		{
			delete SL;
			ListBox1->Items->Add("Checking Latest Version");
		}
	}
	catch(const Exception &)
	{
		DeleteFile(acDest);
	}

David
Technical Details
Message-ID: <44bf7f5b$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.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

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,360df355476f8a7a,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "David Ayre" <davidcayre@ntlworld.com>
Sender: "David Ayre" <davidcayre@ntlworld.com>
Reply-To: "David Ayre" <davidcayre@ntlworld.com>
Subject: Strange problem when using Indy 9 ftp/http
Newsgroups: borland.public.cppbuilder.internet.socket
X-User-Info: 62.252.224.18     
X-Forwarded-For: 81.96.132.239
NNTP-Posting-Host: 207.105.83.66
Message-ID: <44bf7f5b$1@newsgroups.borland.com>
Date: 20 Jul 2006 06:04:27 -0700
X-Trace: newsgroups.borland.com 1153400667 207.105.83.66 (20 Jul 2006 06:04:27 -0700)
Lines: 54
Path: arc1-ca.pugleaf.net!g2news2.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