why dont ya use the InternetGetConnectedState(,) function
just don't forget to include the wininet.h file and to link with the wininet.dll file here is a simple code i wrote as an ex.




DWORD connection;//connection parameters return as if lan or dial
//up connected see the msdn

if(InternetGetConnectedState(&connection,0))
{
m_bConnected=TRUE;//set our status to connected
}
else//we are not connected
{
m_bConnected=FALSE;//set our connected status to false
}


U can Call the internetgetconnectedstate function many times and it works just fine for me in a win98 pc



Hope it works fine !!