WinCE 用代码创建连接"PPPOE”

 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);

 

posted @ 2016-02-26 12:21  91program  阅读(192)  评论(0编辑  收藏  举报