• <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>

            積木

            No sub title

              C++博客 :: 首頁 :: 聯系 :: 聚合  :: 管理
              140 Posts :: 1 Stories :: 11 Comments :: 0 Trackbacks

            常用鏈接

            留言簿(1)

            我參與的團隊

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

                static std::wstring MBytesToWString(const char* lpcszString);
                
            static std::string WStringToMBytes(const wchar_t* lpwcszWString);
                
            static std::wstring UTF8ToWString(const char* lpcszString);
                
            static std::string WStringToUTF8(const wchar_t* lpwcszWString);

            std::wstring KKLogObject::MBytesToWString(const char* lpcszString)
            {
                
            int len = strlen(lpcszString);
                
            int unicodeLen = ::MultiByteToWideChar(CP_ACP, 0, lpcszString, -1, NULL, 0);
                wchar_t
            * pUnicode = new wchar_t[unicodeLen + 1];
                memset(pUnicode, 
            0, (unicodeLen + 1* sizeof(wchar_t));
                ::MultiByteToWideChar(CP_ACP, 
            0, lpcszString, -1, (LPWSTR)pUnicode, unicodeLen);
                wstring wString 
            = (wchar_t*)pUnicode;
                delete [] pUnicode;
                
            return wString;
            }

            std::
            string KKLogObject::WStringToMBytes(const wchar_t* lpwcszWString)
            {
                
            char* pElementText;
                
            int iTextLen;
                
            // wide char to multi char
                iTextLen = ::WideCharToMultiByte(CP_ACP, 0, lpwcszWString, -1, NULL, 0, NULL, NULL);
                pElementText 
            = new char[iTextLen + 1];
                memset((
            void*)pElementText, 0, (iTextLen + 1* sizeof(char));
                ::WideCharToMultiByte(CP_ACP, 
            0, lpwcszWString, 0, pElementText, iTextLen, NULL, NULL);
                std::
            string strReturn(pElementText);
                delete [] pElementText;
                
            return strReturn;
            }

            std::wstring KKLogObject::UTF8ToWString(
            const char* lpcszString)
            {
                
            int len = strlen(lpcszString);
                
            int unicodeLen = ::MultiByteToWideChar(CP_UTF8, 0, lpcszString, -1, NULL, 0);
                wchar_t
            * pUnicode;
                pUnicode 
            = new wchar_t[unicodeLen + 1];
                memset((
            void*)pUnicode, 0, (unicodeLen + 1* sizeof(wchar_t));
                ::MultiByteToWideChar(CP_UTF8, 
            0, lpcszString, -1, (LPWSTR)pUnicode, unicodeLen);
                wstring wstrReturn(pUnicode);
                delete [] pUnicode;
                
            return wstrReturn;
            }

            std::
            string KKLogObject::WStringToUTF8(const wchar_t* lpwcszWString)
            {
                
            char* pElementText;
                
            int iTextLen = ::WideCharToMultiByte(CP_UTF8, 0, (LPWSTR)lpwcszWString, -1, NULL, 0, NULL, NULL);
                pElementText 
            = new char[iTextLen + 1];
                memset((
            void*)pElementText, 0, (iTextLen + 1* sizeof(char));
                ::WideCharToMultiByte(CP_UTF8, 
            0, (LPWSTR)lpwcszWString, -1, pElementText, iTextLen, NULL, NULL);
                std::
            string strReturn(pElementText);
                delete [] pElementText;
                
            return strReturn;
            }

            posted on 2013-03-13 11:32 Jacc.Kim 閱讀(4840) 評論(0)  編輯 收藏 引用 所屬分類: VC / C++
            欧美日韩成人精品久久久免费看| 欧美大香线蕉线伊人久久| 中文字幕日本人妻久久久免费 | 国产2021久久精品| 99蜜桃臀久久久欧美精品网站| 99精品久久精品| 久久er国产精品免费观看8| 无码人妻少妇久久中文字幕| 蜜桃麻豆www久久国产精品| 中文字幕无码精品亚洲资源网久久| 久久午夜福利无码1000合集| 久久Av无码精品人妻系列| 99久久国产亚洲高清观看2024 | 国产精品美女久久福利网站| 狠狠综合久久综合88亚洲| 国产精品99久久久久久宅男| 99久久超碰中文字幕伊人| 欧美日韩精品久久久免费观看| 国产精品内射久久久久欢欢| 久久ZYZ资源站无码中文动漫| 精品国产日韩久久亚洲| 中文字幕人妻色偷偷久久| 色婷婷噜噜久久国产精品12p| 久久久久国产精品嫩草影院| 人人狠狠综合久久亚洲高清| 久久亚洲国产成人影院网站| 久久精品国产一区二区三区不卡| 久久综合狠狠色综合伊人| 久久精品国产亚洲AV不卡| 欧美日韩精品久久久免费观看| 久久久久久国产精品美女| 久久婷婷五月综合97色| 狠狠色综合久久久久尤物| 亚洲欧美久久久久9999| 成人免费网站久久久| 伊色综合久久之综合久久| 久久久久国产精品| 精品无码久久久久国产动漫3d| 亚洲狠狠综合久久| 久久综合精品国产二区无码| 激情五月综合综合久久69|