Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Internet connection???
Message
 
To
25/01/2002 16:55:24
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00610822
Message ID:
00610852
Views:
29
This message has been marked as the solution to the initial question of the thread.
In my program I do it like this ...
*-----
*CheckInetConnection()
*-----
LOCAL lnhInet
LOCAL lnFlags
LOCAL lnhUrl
LOCAL llConnected

#DEFINE cnINTERNET_FLAG_RELOAD 2147483648
#DEFINE cnINTERNET_FLAG_SECURE 8388608
#DEFINE cnINTERNET_FLAG_NO_CACHE_WRITE 67108864
#DEFINE cnINTERNET_FLAG_KEEP_CONNECTION 4194304


DECLARE INTEGER InternetOpen IN WININET.DLL STRING, INTEGER, STRING, STRING, INTEGER
DECLARE INTEGER InternetOpenUrl IN WININET.DLL INTEGER, STRING, STRING, INTEGER, INTEGER, INTEGER
DECLARE INTEGER InternetCloseHandle IN WinInet.DLL INTEGER

llConnected = .F.
lnhInet = InternetOpen('Archidata', 1, NULL, NULL, 0)

IF lnhInet > 0
lnFlags = cnINTERNET_FLAG_KEEP_CONNECTION + cnINTERNET_FLAG_NO_CACHE_WRITE + cnINTERNET_FLAG_RELOAD
lnhUrl = InternetOpenUrl(lnhInet, 'http://www.archidata.com', '', 0, lnFlags, 0)

IF lnhUrl > 0
llConnected = .T.
InternetCloseHandle(lnhUrl)
ENDIF
ENDIF
InternetCloseHandle(lnhInet)

RETURN llConnected
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform