• <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++博客 :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
              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 閱讀(4825) 評論(0)  編輯 收藏 引用 所屬分類: VC / C++
            亚洲精品国产自在久久| 国产精品久久久久9999高清| 久久精品人人做人人爽电影| 少妇精品久久久一区二区三区| 一级做a爰片久久毛片免费陪| 四虎国产精品免费久久久| 精品久久一区二区| 久久99精品国产| 亚洲国产二区三区久久| 久久香蕉综合色一综合色88| 久久综合久久久| 草草久久久无码国产专区| 国产激情久久久久影院| 色婷婷久久久SWAG精品| 久久精品国产清自在天天线| 亚洲国产精品18久久久久久| 好久久免费视频高清| 亚洲国产天堂久久综合网站| 久久男人AV资源网站| 97视频久久久| 2021久久精品国产99国产精品| 伊人久久大香线焦综合四虎| 国产午夜精品理论片久久| 久久国产一片免费观看| 久久亚洲精品成人无码网站| 人妻少妇久久中文字幕一区二区| 99国产欧美久久久精品蜜芽| 久久夜色精品国产亚洲av| 伊人久久精品无码av一区| 伊人丁香狠狠色综合久久| 久久婷婷五月综合色奶水99啪| 国产精品久久久久久吹潮| 久久综合一区二区无码| 久久丫精品国产亚洲av不卡 | 欧美伊人久久大香线蕉综合69 | 久久精品国产亚洲AV嫖农村妇女| 久久免费精品一区二区| 热99RE久久精品这里都是精品免费| 久久发布国产伦子伦精品| 一级做a爰片久久毛片毛片| 日本精品久久久久中文字幕8|