Dial Internet default connection
To dial Internet default connection, we can use the function:
And to hang up the active connection:
Both cases, we must include WinInet at the uses of the active form.
Both functions return TRUE if action was successfully, or FALSE if not.
If we want also to check if the computer is already connected to Internet, we can do it using the function InternetGetConnectdState.
Let's go to use it in an example. We'll made a function to check if we are connected to Internet or not. If we are, it will hang up connection. If not, it will connect.