?
Solved

Auto dial up

Posted on 2002-06-02
4
Medium Priority
?
200 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 12

Accepted Solution

by:
Lee_Nover earned 200 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month12 days, 9 hours left to enroll

777 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