• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 74, 文章 - 0, 評論 - 26, 引用 - 0
            數據加載中……

            windows mobile 關閉gprs連接

            unsigned int CloseRasGPRSConnections()
            {
                 int index; // An integer index
                 DWORD dwError, dwRasConnSize, dwNumConnections; // Number of connections found
                 RASCONN RasConn[20]; // Buffer for connection state data,Assume the maximum number of entries is 20.
                BOOL RETURN_VALUE=0;
                WCHAR *MySelectNetName;

                 // Assume no more than 20 connections.
                 RasConn[0].dwSize = sizeof (RASCONN);
                 dwRasConnSize = 20 * sizeof (RASCONN);

                 // Find all connections.
                 if (dwError = RasEnumConnections (RasConn, &dwRasConnSize,&dwNumConnections))
                 {
                      return -1;
                 }

                 // If there are no connections, return zero.
                 if (!dwNumConnections)
                 {
                      return 0;
                 }

                 // Terminate all of the remote access connections.
                 GetConnectionStatus();
                //here add to get selected network
                MySelectNetName=GetMMSSelectNet();
               
                GPRSServerName* P_CMWAPtemp=pCMWAP_backup;
                 for (index = 0; index < (int)dwNumConnections; ++index)
                 {
                     while( P_CMWAPtemp )
                     {
                          if(!wcscmp(RasConn[index].szEntryName,P_CMWAPtemp->ServerName)||
                            !wcscmp(RasConn[index].szEntryName, MySelectNetName))
                          {
                               if (dwError = RasHangUp (RasConn[index].hrasconn))
                                   
                                    RETURN_VALUE=-1;
                               else
                                       //successfully disconnect cmwap;
                                    RETURN_VALUE=0;
                          }
                        P_CMWAPtemp = P_CMWAPtemp->pnext ;
                      }
                 }
                //free mem
                 freelink(pCMWAP_backup);
                 return RETURN_VALUE;
            }


            posted on 2007-11-22 12:59 井泉 閱讀(1754) 評論(1)  編輯 收藏 引用 所屬分類: C++

            評論

            # re: windows mobile 關閉gprs連接  回復  更多評論   

            RasEnumConnections 在有些機器上不能用,有好的解決方法嗎

            What are you trying to accomplish? You can find an existing RAS connection
            using RAS API. However, it is much harder task to find all active
            connections (Ethernet, M/PDP GPRS etc.)

            --
            Yaroslav Goncharov
            Pocket PC Developer Network coordinator, http://pocketpcdn.com
            Spb Software House, http://spbsoftwarehouse.com

            Thanks
            2008-02-18 17:24 | jacky lee
            欧美久久一级内射wwwwww.| 亚洲国产精品无码久久久久久曰 | 2021久久精品免费观看| 国产精品天天影视久久综合网| 亚洲精品无码久久不卡| 久久免费线看线看| 久久国产色AV免费看| 久久午夜无码鲁丝片午夜精品| 久久精品九九亚洲精品| 久久一区二区免费播放| 久久996热精品xxxx| 久久国产成人亚洲精品影院| 国产精品99久久精品| 日韩人妻无码精品久久免费一 | 久久久久国产日韩精品网站| 欧美一区二区三区久久综| 综合久久一区二区三区 | 丰满少妇人妻久久久久久4| 国产精品美女久久久| 热久久这里只有精品| 国产精品99久久久久久猫咪| 国产精品va久久久久久久| 久久国产成人| 久久99精品久久久久婷婷| 国内精品久久久久| 人人狠狠综合88综合久久| 欧美久久亚洲精品| 91精品国产综合久久婷婷| 国产精品久久久久乳精品爆| 久久中文字幕一区二区| 久久这里只精品99re66| 国产日产久久高清欧美一区| 久久婷婷五月综合97色直播| 77777亚洲午夜久久多喷| 久久九九兔免费精品6| 97久久超碰国产精品2021| 亚洲人AV永久一区二区三区久久| 99久久777色| 青青草国产成人久久91网| 中文字幕久久精品无码| 色老头网站久久网|