InternetDial function (wininet.h)
Initiates a connection to the Internet using a modem.
Syntax
DWORD InternetDial(
[in] HWND hwndParent,
[in] LPSTR lpszConnectoid,
[in] DWORD dwFlags,
[out] LPDWORD lpdwConnection,
[in] DWORD dwReserved
);
Parameters
[in] hwndParent
Handle to the parent window.
[in] lpszConnectoid
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.
[in] dwFlags
Options. This parameter can be one of the following values.
Value | Meaning |
---|---|
|
Forces an online connection. |
|
Forces an unattended Internet dial-up. If user intervention is required, the function will fail. |
|
Ignores the "dial automatically" setting and forces the dialing user interface to be displayed. |
|
Connects to the Internet through a modem, without displaying a user interface, if possible. Otherwise, the function will wait for user input. |
|
Shows the Work Offline button instead of the Cancel button in the dialing user interface. |
[out] lpdwConnection
Pointer to a variable that specifies the connection number. This number is a unique identifier for the connection that can be used in other functions, such as InternetHangUp.
[in] dwReserved
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 |
---|---|
|
One or more of the parameters are incorrect. |
|
There is a problem with the dial-up connection. |
|
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.
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 | wininet.h (include Wininet.h, Winineti.h, Wininet.h, Winineti.h) |
Library | Wininet.lib |
DLL | Wininet.dll |