Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verification for dialup access
Message
 
 
À
16/03/2004 19:15:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00886903
Message ID:
00886916
Vues:
14
>>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform