Alaska Software Inc. - Internet Connection Check
Username: Password:
AuthorTopic: Internet Connection Check
Carlos a Beling Internet Connection Check
on Tue, 13 Mar 2018 12:55:44 -0300
Good afternoon.
I want to test if it has an internet connection active and I thought to 
use https://msdn.microsoft.com/en-us/library/aa384702(VS.85).aspx but it 
is not recommend to use it.
Please how can I use
https://msdn.microsoft.com/en-us/library/aa370773(v=vs.85).aspx  ?

Fraternally
Beling
Jorge L. BorlandoRe: Internet Connection Check
on Wed, 14 Mar 2018 18:14:29 -0300
Hi Carlos
You can to use the TServerXMLHTTPRequest() class from ot4xb

for example
      oHttp := TServerXMLHTTPRequest():New()
      oHttp:Open( "GET", 'https://www.google.com.ar' )
      oHttp:Send()
      ? oHttp:Status()               //200 ok, 500 : not service
      ? oHttp:responseBody   //empty : no response
      oHttp:Release()

https://msdn.microsoft.com/en-us/library/ms767681(v=vs.85).aspx

regards

"Carlos a Beling" <beling@bipbip.com.br> wrote in message 
news:14696f1f$2f06d883$e308a@news.alaska-software.com...
> Good afternoon.
> I want to test if it has an internet connection active and I thought to 
> use https://msdn.microsoft.com/en-us/library/aa384702(VS.85).aspx but it 
> is not recommend to use it.
> Please how can I use
> https://msdn.microsoft.com/en-us/library/aa370773(v=vs.85).aspx  ?
>
> Fraternally
> Beling
Carlos a Beling Re: Internet Connection Check
on Thu, 15 Mar 2018 10:56:05 -0300
Hello Jorge.
Many thanks.
I will give it a try.

As I do not know how, I asked if someone could, please, post here how to 
activate INetworkListManager::GetConnectivity method for me learning a 
little bit about it.

Fraternally
Beling



Em 14/03/2018 18:14, Jorge L. Borlando escreveu:
> Hi Carlos
> You can to use the TServerXMLHTTPRequest() class from ot4xb
>
> for example
>       oHttp := TServerXMLHTTPRequest():New()
>       oHttp:Open( "GET", 'https://www.google.com.ar' )
>       oHttp:Send()
>       ? oHttp:Status()               //200 ok, 500 : not service
>       ? oHttp:responseBody   //empty : no response
>       oHttp:Release()
>
> https://msdn.microsoft.com/en-us/library/ms767681(v=vs.85).aspx
>
> regards
>
> "Carlos a Beling" <beling@bipbip.com.br> wrote in message
> news:14696f1f$2f06d883$e308a@news.alaska-software.com...
>> Good afternoon.
>> I want to test if it has an internet connection active and I thought
>> to use https://msdn.microsoft.com/en-us/library/aa384702(VS.85).aspx
>> but it is not recommend to use it.
>> Please how can I use
>> https://msdn.microsoft.com/en-us/library/aa370773(v=vs.85).aspx  ?
>>
>> Fraternally
>> Beling
>
Jose Antonio Diego KerejeRe: Internet Connection Check
on Thu, 15 Mar 2018 19:30:52 +0100
Hi Carlos:

#define CLSID_NetworkListManager 
"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"
#define NLM_CONNECTIVITY_IPV4_INTERNET     0x0040


oNLM:= CreateObject( CLSID_NetworkListManager )

     oNLM:IsConnectedToInternet()

     or

     BAnd(  oNLM:getConnectivity(), NLM_CONNECTIVITY_IPV4_INTERNET ) # 0

oNML:destroy()

Regards. Diego
Carlos a Beling Re: Internet Connection Check
on Fri, 16 Mar 2018 09:35:38 -0300
Hello Diego.
Good morning.
Many thanks.
You made thngs easier for me.

Fraternally
Beling


Em 15/03/2018 15:30, Jose Antonio Diego Kereje escreveu:
> Hi Carlos:
>
> #define CLSID_NetworkListManager "{DCB00C01-570F-4A9B-8D69-199FDBA5723B}"
> #define NLM_CONNECTIVITY_IPV4_INTERNET     0x0040
>
>
> oNLM:= CreateObject( CLSID_NetworkListManager )
>
>      oNLM:IsConnectedToInternet()
>
>      or
>
>      BAnd(  oNLM:getConnectivity(), NLM_CONNECTIVITY_IPV4_INTERNET ) # 0
>
> oNML:destroy()
>
> Regards. Diego
>