1 ZeroMemory(lpRasEntry, sizeof(RASENTRY));
2
3 lpRasEntry->dwSize = dwBufferSize;
4 lpRasEntry->dwfOptions = RASEO_SwCompression|RASEO_RemoteDefaultGateway|RASEO_PreviewUserPw;
5 //lpRasEntry->dwType = RASET_Broadband;
6 lstrcpy(lpRasEntry->szDeviceType, RASDT_PPPoE);
7 //lstrcpy(lpRasEntry->szDeviceName, L"pppoe");
8 lstrcpy(lpRasEntry->szDeviceName, L"PPPoE Line 0");
9 lpRasEntry->dwfNetProtocols = RASNP_Ip;
10 lpRasEntry->dwFramingProtocol = RASFP_Ppp;
11
12 // 创建连接
13 dwRet = RasSetEntryProperties(NULL, L"pppoe", lpRasEntry, dwBufferSize, NULL, 0);