Как узнать в online компьютер или нет

Platform SDK: RAS/Routing and RAS
**************************************
lpRasConn = (LPRASCONN) GlobalAlloc(GPTR, sizeof(RASCONN));
lpRasConn->dwSize = sizeof(RASCONN);

nRet = RasEnumConnections(lpRasConn, &lpcb, &lpcConnections);
if (nRet != 0)
{
printf("RasEnumConnections failed: Error = %d", nRet);
}
else
{
printf("The following RAS connections are currently active\n\n");
for (i = 0; i < lpcConnections; i++)
{
printf("Entry name: %s\n", lpRasConn->szEntryName);
lpRasConn++;
}
}
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Ras.h.
Library: Use Rasapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.