MSDN:
Код:
InternetGetConnectedState
Retrieves the connected state of the local system.
BOOL InternetGetConnectedState(
LPDWORD lpdwFlags,
DWORD dwReserved
);
Еще можно попробовать это:
Код:
RasEnumConnections
The RasEnumConnections function lists all active RAS connections. It returns each connection's handle and phone-book entry name.
DWORD RasEnumConnections(
LPRASCONN lprasconn,
LPDWORD lpcb,
LPDWORD lpcConnections
);