InternetAutoDial(dwFlags, hwndParent) ;
Where dwFlags can be one of the following values:
INTERNET_AUTODIAL_FAILIFSECURITYCHECK - causes InternetAutodial to fail if file and printer sharing is disabled for Microsoft® Windows® 95 or later.
INTERNET_AUTODIAL_FORCE_ONLINE - forces an online Internet connection.
INTERNET_AUTODIAL_FORCE_UNATTENDED - forces an unattended Internet dial-up.
and, hwndParent is Handle to the parent window.
Exmaple:
~~~~~~~~~~~~~~~~~~~~~~~~~
uses WinInet;
...
InternetAutoDial(internet_autodial_force_unattended, Handle) ;
{
To disconnect this automatic dial-up connection, use
}
InternetAutodialHangup(0)
{
Another way is to specify the name
of the connection you wish to use
(ConnectionName), from Dialup
networking:
}
if InternetDial
(0, PChar(ConnectionName), INTERNET_AUTODIAL_FORCE_UNATTENDED, dwConn, 0) <> ERROR_SUCCESS then exit;
//Do something with Internet...
InternetHangup(dwConn, 0) ;
~~~~~~~~~~~~~~~~~~~~~~~~~
Delphi tips navigator:
» How to correctly use the mouse wheel in TDBGrid
« How to Convert a String of Integers into an Array of Byte

