IsInternet() is failing to recognise internet sometimes

IsInternet() is failing to recognise internet sometimes

Postby RAMESHBABU » Thu Nov 17, 2011 11:15 am

Hi Friends,

Our product support executive are complaining that, some times our applications are
not recognising internet, through every thing is fine there with all internet
activities.

I am checking the internet connection initially with ISINTERNET(), before I proceed
with my functionality. Almost, every time it is working correctly, But some times
it is not giving the correct result :? .

Anybody has experience this behaviour ? if so, any solution ?

Regards,

- Ramesh Babu P
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India

Re: IsInternet() is failing to recognise internet sometimes

Postby lucasdebeltran » Thu Nov 17, 2011 11:29 am

Hello,

Fivewin Internet functions sometimes fail.

You can try this way:

Code: Select all  Expand view
//

   PROCEDURE Main
      LOCAL pSocket

      INetInit()

      pSocket := INetConnect( "www.hotmail.com", 80 )

      ? INetAddress( pSocket )  

      INetClose( pSocket )
      INetCleanUp()
   RETURN
Muchas gracias. Many thanks.

Un saludo, Best regards,

Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]

Implementando MSVC 2010, FWH64 y ADO.

Abandonando uso xHarbour y SQLRDD.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: IsInternet() is failing to recognise internet sometimes

Postby RAMESHBABU » Thu Nov 17, 2011 2:43 pm

Hello Mr.Lucas,

Thank you very much for your response.

I have tried exactly the way you have tried as under:

Let me check the results, tommorrow.

-Ramesh Babu P


Code: Select all  Expand view


   FUNCTION Is_Internet()

      LOCAL pSocket, lOk := .F.

      INetInit()

      pSocket := INetConnect( "www.google.com", 80 )

      IF INetAddress( pSocket ) = 0
         lOk := .T.
      ENDIF  

      INetClose( pSocket )
      INetCleanUp()
 
 RETURN lOk

 
User avatar
RAMESHBABU
 
Posts: 624
Joined: Fri Oct 21, 2005 5:54 am
Location: Secunderabad (T.S), India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 98 guests