Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controlling DUN
Message
De
12/01/2000 19:53:42
 
 
À
12/01/2000 18:18:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
Divers
Thread ID:
00317306
Message ID:
00317346
Vues:
14
>I need some information on controlling Dial-up Networking from VFP. I'm starting a project where the user will upload and download files via FTP and I don't want them to have to launch DUN themselves.

By far the easiest way I have found to do this is with Wininet's InternetAttemptConnect:

DECLARE Integer InternetAttemptConnect IN WinInet.dll INTEGER
?InternetAttemptConnect(0)

This is a modal call that returns 1 if the connection was successful. It just launches the default connection for the internet, if its a LAN and they are already connected, fine, if its a DUN, the call waits until the connection is complete and the dialog is closed.

Launching a DUN session like this does not give you the RAS handle that you need to hang up. If you need to do this (control the hang up), you will need to launch the connection using the RAS API stuff. Christof's Struct class comes with some great samples on how to do this (you'll want to look at his Struct class for this anyway, these API calls use a structure that his class builds easily).
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform