InetDial

Connects to the internet using the default internet account. This may be necessary if using a dial-up service, or some other service that is not "always on". Also can be used to disconnect from the internet.

Synopsis

error = InetDial(options, window, account)

Args

options specifies some options. It may be any of the following, each separated by a | character:

ValueMeaning
FAILNOSHARE Fail if file and printer sharing is disabled.
ONLINE Force going online.
UNATTENDED Do not present a dialog to the user to prompt him to confirm going online. Instead, use his saved login name and password (that he entered in the dialog previously), and automatically connect.
FORCEDIAL Dial the modem connection even when a network connection to the Internet is present.
HANGUP Disconnect from the internet. This should not be used with the other options.

If omitted, flags defaults to none of the above.

window is a handle to some window you have opened. If you pass your own window handle, then if any dialup dialog is presented to the user, it won't prevent him from accessing other programs on his computer while that dialog is displayed. If you don't have your own window, you can omit this arg. If HANGUP option is specified, then this arg can be omitted.

account is the name of a particular internet account to use (if there are more than one accounts on a given computer). If omitted, then the default account is used. If HANGUP option is specified, then this arg can be omitted.

Returns

An empty string if successful, or an error message if a problem.

Notes

If InetDial succeeds in connecting to the internet, you must eventually call InetDial with the "HANGUP" option (or call InetClose with no args) when done with the connection.

It is not considered an error to hangup if you are not already connected to the internet.

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