Solved

Auto dial up

Posted on 2002-06-02
4
199 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

687 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