Hello , I want to know if my Internet conection is broken in a determinated moment
and I try with RasEnumConections and RasGetStatus but dont work for me
I dont know the correct use for this (sorry for my bad english)

I need a sample for get the status conection.
Always thanks for all to everybody in this wonderful forum
:alright:
Posted on 2003-04-04 13:32:47 by mnemox
try looking up InternetCheckConnection in the MSDN
that should work for you I think.
Posted on 2003-04-10 04:38:18 by asmboy
This is working for me but I don't know the value of this flags.
I think are in wininet.h but I dont have this file.

INTERNET_CONNECTION_CONFIGURED Local system has a valid connection to the Internet,
but it might or might not be currently connected.
INTERNET_CONNECTION_LAN Local system uses a local area network to connect to the Internet.
INTERNET_CONNECTION_MODEM Local system uses a modem to connect to the Internet.
INTERNET_CONNECTION_MODEM_BUSY No longer used.
INTERNET_CONNECTION_OFFLINE Local system is in offline mode.
INTERNET_CONNECTION_PROXY Local system uses a proxy server to connect to the Internet.
INTERNET_RAS_INSTALLED Local system has RAS installed.

I try with CERO and working (first parameter)

invoke InternetGetConnectedState, 0, NULL ; INTERNET_CONNECTION_CONFIGURED == 0 ??

.if eax == 0 ; FALSE = no hay conexion (There is not conection)

invoke ShellExecute, hWnd, NULL, addr reboot, NULL, NULL, SW_SHOWNA

.endif
:grin:
Posted on 2003-04-12 17:59:04 by mnemox
Some of those constants are in windows.inc. anyway, here are the ones in Hutch's windows.inc:
INTERNET_CONNECTION_MODEM equ 1
INTERNET_CONNECTION_LAN equ 2
INTERNET_CONNECTION_MODEM_BUSY equ 8
INTERNET_CONNECTION_PROXY equ 4

These are also the only ones defined in wininet.h /w MSVC 7.
Posted on 2003-04-12 22:35:34 by jademtech