Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Controlling DUN
Message
From
12/01/2000 19:53:42
 
 
To
12/01/2000 18:18:25
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Miscellaneous
Thread ID:
00317306
Message ID:
00317346
Views:
15
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform