InternetAutodial function (winineti.h)

Causes the modem to automatically dial the default Internet connection.

Syntax

BOOL InternetAutodial(
  [in] DWORD dwFlags,
  [in] HWND  hwndParent
);

Parameters

[in] dwFlags

Controls this operation. This parameter can be one of the following values.

Value Meaning
INTERNET_AUTODIAL_FAILIFSECURITYCHECK
0x04
Causes InternetAutodial to fail if file and printer sharing is disabled for Windows 95 or later.

Windows Server 2008 and Windows Vista:  This flag is obsolete.

INTERNET_AUTODIAL_FORCE_ONLINE
0x01
Forces an online Internet connection.
INTERNET_AUTODIAL_FORCE_UNATTENDED
0x02
Forces an unattended Internet dial-up.
INTERNET_AUTODIAL_OVERRIDE_NET_PRESENT
0x08
Causes InternetAutodial to dial the modem connection even when a network connection to the Internet is present.

[in] hwndParent

Handle to the parent window.

Return value

If the function succeeds, it returns TRUE.

If the function fails, it returns FALSE. Applications can call GetLastError to retrieve the error code.

Remarks

InternetAutodial does not support double-dial connections, SmartCard authentication, or connections that require registry-based certification.

Note  Starting on Windows Vista and Windows Server 2008, the WinINet dial-up functions use the RAS functions to establish a dial-up connection. WinINet supports the functionality documented in the RasDialDlg function.
 
InternetAutodial does not attempt to dial if there is an existing dial-up connection on the system. Also, if there is an existing LAN connection, and InternetAutodial is not configured to force dial (set the INTERNET_AUTODIAL_FORCE_ONLINE in the dwFlags parameter), InternetAutodial does not attempt to dial the connection and returns TRUE.

Like all other aspects of the WinINet API, this function cannot be safely called from within DllMain or the constructors and destructors of global objects.

Note  WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).
 

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winineti.h (include Wininet.h)
Library Wininet.lib
DLL Wininet.dll

See also

Establishing a Dial-Up Connection to the Internet

WinINet Functions