Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jan : Re: WinInet InternetCheckConnection and InternetGetConnectedState

www.cryer.info
Managed Newsgroup Archive

Re: WinInet InternetCheckConnection and InternetGetConnectedState

Subject:Re: WinInet InternetCheckConnection and InternetGetConnectedState
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Tue, 29 Jan 2008 10:21:19



> If I use the value 1 as the parameter in the InternetCheckConnection it
> returns true. Is this just a stupid omission from delphi and for that
> matter,
> why would I have to say to force the connection for it to be able to ping
> the web site?

The only way to reliably test a website is to actually try to download
something from it.  So InternetCheckConnection() won't really help you
anyway.

> Actually I just tried it again with a zero and apparently, once it gets
> a successful hit, the next time it returns true even with the zero.

It is likely pulling the file from IE's local cache on subsequent calls.

> But if I change the name to a bad site name, it again returns the 2250
> and will not connect again until I set the parameter to 1 again. It seems
> like windows is maintaining a connection to the site once it pings it.

Not a connection, no.  But the actual file, likely.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive