Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verification for dialup access
Message
From
16/03/2004 19:15:45
 
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00886903
Message ID:
00886912
Views:
19
>To call the default Windows dialup you can use InternetAutodial WinInet API function Re: How to call dialup networking connection from within Fox Message #787301. To check for existing connection try Re: Can I truly check for Internet connection? Message #724761

I ended up with two functions. One to check if connected and the other to fire the connection manager:
* Verify if we are connected to the Internet
* expC1 A Web address
FUNCTION IsConnected
PARAMETERS tcWebAddress
LOCAL llConnect
Declare Integer InternetCheckConnection in Wininet.dll String Url, Long dwFlags, Long Reserved
llConnect=InternetCheckConnection(tcWebAddress,1,0)>0


* Initiating Inet connection using a modem
FUNCTION ConnectToTheInternet
LOCAL lnConnection 
#DEFINE INTERNET_AUTODIAL_FORCE_ONLINE         1 
#DEFINE INTERNET_AUTODIAL_FORCE_UNATTENDED     2 
#DEFINE INTERNET_AUTODIAL_FAILIFSECURITYCHECK  4 

DECLARE INTEGER GetActiveWindow IN user32 

DECLARE INTEGER InternetDial IN wininet; 
 INTEGER hwndParent, STRING lpszConnectoid, INTEGER dwFlags,; 
 INTEGER @lpdwConnection, INTEGER dwReserved 

lnConnection=0 

InternetDial(GetActiveWindow(),'MyProvider',INTERNET_AUTODIAL_FORCE_ONLINE,@lnConnection,0)
Do you see anything to enhance in there?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform