Initiates a connection to the Internet using a modem.
Syntax
DWORD InternetDial(
__in HWND hwndParent,
__in LPTSTR pszEntryName,
__in DWORD dwFlags,
__out DWORD_PTR *lpdwConnection,
__in DWORD dwReserved
);
Parameters
- hwndParent [in]
-
Handle to the parent window.
- pszEntryName [in]
-
Pointer to a null-terminated string that specifies the name of the dial-up connection to be used. If this parameter contains the empty string (""), the user chooses the connection. If this parameter is NULL, the function connects to the autodial connection.
- dwFlags [in]
-
Options. This parameter can be one of the following values.
| Value | Meaning |
- INTERNET_AUTODIAL_FORCE_ONLINE
| Forces an online connection.
|
- INTERNET_AUTODIAL_FORCE_UNATTENDED
| Forces an unattended Internet dial-up. If user intervention is required, the function will fail.
|
- INTERNET_DIAL_FORCE_PROMPT
| Ignores the "dial automatically" setting and forces the dialing user interface to be displayed.
|
- INTERNET_DIAL_UNATTENDED
| Connects to the Internet through a modem, without displaying a user interface, if possible. Otherwise, the function will wait for user input.
|
- INTERNET_DIAL_SHOW_OFFLINE
| Shows the Work Offline button instead of the Cancel button in the dialing user interface.
|
- lpdwConnection [out]
-
Pointer to a variable that specifies the connection number.
- dwReserved [in]
-
This parameter is reserved and must be NULL.
Return Value
Returns ERROR_SUCCESS if successful, or an error value otherwise. The error code can be one of the following values.
| Return code | Description |
- ERROR_INVALID_PARAMETER
| One or more of the parameters are incorrect.
|
- ERROR_NO_CONNECTION
| There is a problem with the dial-up connection.
|
- ERROR_USER_DISCONNECTION
| The user clicked either the Work Offline or Cancel button on the Internet connection dialog box.
|
Remarks
InternetDial 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.
Requirements
| Minimum supported client | Windows 2000 Professional |
| Minimum supported server | Windows 2000 Server |
| Version | Internet Explorer 4.0 or later |
| Header | Wininet.h |
| Library | Wininet.lib |
| DLL | Wininet.dll |
| Unicode and ANSI names | InternetDialW (Unicode) and InternetDialA (ANSI) |
See Also
- Establishing a Dial-Up Connection to the Internet
- WinINet Functions
Send comments about this topic to Microsoft
Build date: 11/19/2009