Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Verification for dialup access
Message
 
 
To
16/03/2004 19:15:45
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00886903
Message ID:
00886916
Views:
13
>>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?

The second parameter in InternetDial is a Dial-up connection name. Shouldn't it be passed as parameter to the ConnectToTheInternet() function?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform