>From the WinInet.pas file :

const
  INTERNET_CONNECTION_MODEM           = 1;
  
  INTERNET_CONNECTION_LAN             = 2;
  
  INTERNET_CONNECTION_PROXY           = 4;
 
  INTERNET_CONNECTION_MODEM_BUSY      = 8;

For example I am connecting through a Proxy Server and a Lan so :

uses
  WinInet, .....

Function IsConnected : Boolean;
var
  nTypes : Integer;
begin
  nTypes := INTERNET_CONNECTION_LAN + INTERNET_CONNECTION_PROXY;
  
  if InternetGetConnectedState(@nTypes, 0) then
     Result := True
  else
     Result := False;
end;

I have knocked up a wee demo app that I can send you if you like.


-----Original Message-----
From: gajo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 30 August 2000 15:18
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Connection and disconnection


OK thank you for these functions, but could you also tell me what flags can
I use with it? I found nothing
about them in Delphi help, so I'm not sure how does this function works. I
get FALSE all the time..


James Sugrue wrote:

> The are two functions in the WinInet.pas file that may be of use.
>
> InternetGetConnectedState and
> InternetCheckConnection

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"



CAUTION - This message may contain privileged and confidential information intended 
only for the 
use of the addressee(s) named above.  If you are not the intended recipient of this 
message you are 
hereby notified that any use, dissemination, distribution or reproduction of this 
message is prohibited.  
If you have received this message in error please notify Progressive Enterprises Ltd. 
immediately via 
email at [EMAIL PROTECTED]  Any views expressed in this message 
are those of the 
individual sender and may not necessarily reflect the views of Progressive Enterprises 
Ltd.

This footnote also confirms that Progressive Enterprises Ltd. has swept this email 
message for the 
presence of computer viruses.  This does not guarantee this message is virus free.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to