FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour IsInternet() is failing to recognise internet sometimes
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
IsInternet() is failing to recognise internet sometimes
Posted: 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
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: IsInternet() is failing to recognise internet sometimes
Posted: Thu Nov 17, 2011 11:29 AM
Hello,

Fivewin Internet functions sometimes fail.

You can try this way:

Code (fw): Select all Collapse
// 

   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.
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
Re: IsInternet() is failing to recognise internet sometimes
Posted: Thu Nov 17, 2011 02: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 (fw): Select all Collapse
   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

Continue the discussion