#include <Sensapi.h.> DWORD dwRet; if (IsNetworkAlive(&dwRet) == FALSE) { AfxMessageBox(_T("연결된 네트워크가 없습니다.")); } else { if (dwRet == NETWORK_ALIVE_LAN) AfxMessageBox(_T("LAN 연결")); else if (dwRet == NETWORK_ALIVE_WAN) AfxMessageBox(_T("WAN 연결")); else if (dwRet == NETWORK_ALIVE_AOL) AfxMessageBox(_T("AOL 네트워크 연결")); }
Windows Me 버전 이상, Explorer 5.0 이상…