Solved

Auto dial up

Posted on 2002-06-02
4
193 Views
Last Modified: 2010-04-04
Hi
I want to build an application which AUTOMATICALLY connects to the internet via dialup connection (previously set in Dialup networking), do something over the connection (for example, send, get email, doesn't matter, I know how to do it) then AUTOMATICALLY disconnects!
some sample code?
please help
thanks
0
Comment
Question by:gikam
4 Comments
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 50 total points
ID: 7052603
you use the folowing functions

uses wininet;

// this connects to the default dialup account
connected:=InternetAutoDial(INTERNET_AUTODIAL_FORCE_ONLINE or INTERNET_AUTODIAL_FORCE_UNATTENDED, 0);
//do stuff
InternetAutodialHangup(0);



another way is to specify the name of the connection you wish to use:

if InternetDial(0, PChar(ConnectionName), INTERNET_AUTODIAL_FORCE_UNATTENDED, dwConn, 0) <> ERROR_SUCCESS then exit;
// do stuff
InternetHangup(dwConn, 0);


should be simple enough
here is the MSDN link :
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/wininet/overview/establish.asp
0
 
LVL 5

Expert Comment

by:Gwena
ID: 7053090
Listening :-)
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9010424
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from Lee_Nover

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video discusses moving either the default database or any database to a new volume.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now