Automatic Dialing Functions

Automatic Dialing Functions


The functions described in this section handle dial-up access to the Internet.
InternetAutodial
InternetAutodialHangup
InternetDial
InternetGetConnectedState
InternetGoOnline
InternetHangUp
InternetSetDialState

InternetAutodial

BOOL InternetAutodial(
    IN DWORD dwFlags,
    IN DWORD dwReserved
);

Automatically causes the modem to dial the default Internet connection.

dwFlags
Double-word value that contains the flags controlling this operation. Can be one of the following values:
INTERNET_AUTODIAL_FORCE_ONLINE Forces an online Internet connection.
INTERNET_AUTODIAL_FORCE_UNATTENDED Forces an unattended Internet dial-up.
dwReserved
Reserved. Must be set to zero.

InternetAutodialHangup

BOOL InternetAutodialHangup(
    IN DWORD dwReserved
);

Disconnects an automatic dial-up connection.

dwReserved
Reserved. Must be set to zero.

InternetDial

DWORD InternetDial(
    IN HWND hwndParent,
    IN LPTSTR lpszConnectoid,
    IN DWORD dwFlags,
    OUT LPDWORD lpdwConnection,
    IN DWORD dwReserved
);

Initiates a connection to the Internet using a modem connection.

hwndParent
Handle to the parent window.
lpszConnectoid
String value containing the name of the dial-up connection to use.
dwFlags
Double-word value that contains the flags to use. Can be one of the following values:
INTERNET_AUTODIAL_FORCE_ONLINE Forces an online connection.
INTERNET_AUTODIAL_FORCE_UNATTENDED Forces an unattended Internet dial-up.
INTERNET_DIAL_UNATTENDED Connects to the Internet through a modem, without displaying a user interface.
lpdwConnection
Address of a double-word value containing the number associated to the connection.
dwReserved
Reserved. Must be set to zero.

InternetGetConnectedState

BOOL InternetGetConnectedState(
    OUT LPDWORD lpdwFlags,
    IN DWORD dwReserved
);

Retrieves the connected state of the local system.

lpdwFlags
Address of a double-word variable where the connection description should be returned. Can be a combination of the following values:
INTERNET_CONNECTION_MODEM Local system uses a modem to connect to the Internet.
INTERNET_CONNECTION_LAN Local system uses a local area network to connect to the Internet.
INTERNET_CONNECTION_PROXY Local system uses a proxy server to connect to the Internet.
INTERNET_CONNECTION_MODEM_BUSY Local system's modem is busy with a non-Internet connection.
dwReserved
Reserved. Must be set to zero.

InternetGoOnline

BOOL InternetGoOnline(
    IN LPTSTR lpszURL,
    IN HWND hwndParent,
    IN DWORD dwReserved
);

Prompts the user for permission to initiate connection to a URL.

lpszURL
String value containing the URL of the Web site to connect to.
hwndParent
Handle to the parent window.
dwReserved
Reserved. Must be set to zero.

InternetHangUp

DWORD InternetHangUp(
    IN DWORD dwConnection,
    IN DWORD dwReserved
);

Instructs the modem to disconnect from the Internet.

dwConnection
Double-word value that contains the number assigned to the connection to be disconnected.
dwReserved
Reserved. Must be set to zero.

InternetSetDialState

BOOL InternetSetDialState(
    IN LPCSTR lpszConnectoid,
    IN DWORD dwState,
    IN DWORD dwReserved
);

Sets the modem dialing state.

lpszConnectoid
String value that contains the name of the dial-up connection.
dwState
Double-word value that indicates the state to set the dial-up connection to. Currently, the only defined value is INTERNET_DIALSTATE_DISCONNECTED.
dwReserved
Reserved. Must be set to zero.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.