Irwan,
Please do not allocate any credit (stars) for this answer as I am only copying the answer from another message I found here on the UT. I cannot remember the original authors name.
Jos
#DEFINE INTERNET_AUTODIAL_FORCE_ONLINE 1
#DEFINE INTERNET_AUTODIAL_FORCE_UNATTENDED 2
DECLARE INTEGER InternetDial IN wininet.dll;
INTEGER hwndParent, STRING @ lpszConnectoid, ;
INTEGER dwFlags, INTEGER @ lpdwConnection, ;
INTEGER dwReserved
DECLARE INTEGER InternetAutodial IN wininet.dll;
INTEGER dwFlags, INTEGER hwndParent
DECLARE INTEGER InternetAutodialHangup IN wininet.dll;
INTEGER dwReserved
* Connect with prompt using selected connection
strConnection = "MyConnection"
nConnection = 0
TCONNECT = InternetDial(0, strConnection, INTERNET_AUTODIAL_FORCE_UNATTENDED, nConnection, 0)
* Connect with prompt using default connection
TCONNECT = InternetAutodial(INTERNET_AUTODIAL_FORCE_ONLINE, 0)
* Connect without prompt
TCONNECT = InternetAutodial(INTERNET_AUTODIAL_FORCE_UNATTENDED, 0)
* Disconnect
= InternetAutodialHangup( TCONNECT )
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.