Skip to content

Commit f85111c

Browse files
committed
modify:windows management app to unicode character set from ansi
1 parent 50c8c0b commit f85111c

File tree

25 files changed

+498
-411
lines changed

25 files changed

+498
-411
lines changed

XEngine_Source/AuthorizeModule_CDKey/AuthorizeModule_CDKey.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
<LanguageStandard>stdcpp20</LanguageStandard>
118118
<LanguageStandard_C>stdc17</LanguageStandard_C>
119119
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
120+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
120121
</ClCompile>
121122
<Link>
122123
<SubSystem>Windows</SubSystem>

XEngine_Source/AuthorizeModule_Client/AuthorizeModule_Client.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
<LanguageStandard>stdcpp20</LanguageStandard>
118118
<LanguageStandard_C>stdc17</LanguageStandard_C>
119119
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
120+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
120121
</ClCompile>
121122
<Link>
122123
<SubSystem>Windows</SubSystem>

XEngine_Source/AuthorizeModule_Configure/AuthorizeModule_Configure.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
<LanguageStandard>stdcpp20</LanguageStandard>
123123
<LanguageStandard_C>stdc17</LanguageStandard_C>
124124
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
125+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
125126
</ClCompile>
126127
<Link>
127128
<SubSystem>Windows</SubSystem>

XEngine_Source/AuthorizeModule_Database/AuthorizeModule_Database.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
<LanguageStandard>stdcpp20</LanguageStandard>
118118
<LanguageStandard_C>stdc17</LanguageStandard_C>
119119
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
120+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
120121
</ClCompile>
121122
<Link>
122123
<SubSystem>Windows</SubSystem>

XEngine_Source/AuthorizeModule_Help/AuthHelp_ClipBoard/AuthHelp_ClipBoard.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ CAuthHelp_ClipBoard::~CAuthHelp_ClipBoard()
4343
意思:是否成功
4444
备注:
4545
*********************************************************************/
46-
bool CAuthHelp_ClipBoard::AuthHelp_ClipBoard_Set(LPCXSTR lpszMsgBuffer, int nMsgLen, XLONG dwFormat)
46+
bool CAuthHelp_ClipBoard::AuthHelp_ClipBoard_Set(LPCTSTR lpszMsgBuffer, int nMsgLen, XLONG dwFormat)
4747
{
4848
Help_IsErrorOccur = true;
4949

@@ -75,7 +75,7 @@ bool CAuthHelp_ClipBoard::AuthHelp_ClipBoard_Set(LPCXSTR lpszMsgBuffer, int nMsg
7575
Help_dwErrorCode = ERROR_AUTHORIZE_MODULE_HELP_CLIPBOARD_MALLOC;
7676
return false;
7777
}
78-
XCHAR* ptszBuffer = (XCHAR*)GlobalLock(hGlobal); //锁定一个全局内存对象 并且返回一个指向其第一个内存地址的指针 返回类型为 XPVOID
78+
TCHAR* ptszBuffer = (TCHAR*)GlobalLock(hGlobal); //锁定一个全局内存对象 并且返回一个指向其第一个内存地址的指针 返回类型为 XPVOID
7979
memcpy(ptszBuffer, lpszMsgBuffer, nMsgLen);
8080

8181
SetClipboardData(dwFormat, hGlobal); //设置到剪贴板内容格式,然后是 数据的指针。
@@ -109,7 +109,7 @@ bool CAuthHelp_ClipBoard::AuthHelp_ClipBoard_Set(LPCXSTR lpszMsgBuffer, int nMsg
109109
意思:是否成功
110110
备注:
111111
*********************************************************************/
112-
bool CAuthHelp_ClipBoard::AuthHelp_ClipBoard_Get(XCHAR* ptszMsgBuffer, int* pInt_MsgLen, XLONG dwFormat /* = 1 */)
112+
bool CAuthHelp_ClipBoard::AuthHelp_ClipBoard_Get(TCHAR* ptszMsgBuffer, int* pInt_MsgLen, XLONG dwFormat /* = 1 */)
113113
{
114114
Help_IsErrorOccur = false;
115115

@@ -134,7 +134,7 @@ bool CAuthHelp_ClipBoard::AuthHelp_ClipBoard_Get(XCHAR* ptszMsgBuffer, int* pInt
134134
return false;
135135
}
136136

137-
XCHAR* ptszBuffer = (XCHAR*)GlobalLock(hCliBd); //将句柄转化为地址
137+
TCHAR* ptszBuffer = (TCHAR*)GlobalLock(hCliBd); //将句柄转化为地址
138138
*pInt_MsgLen = (int)GlobalSize(hCliBd) - 1; //剪贴板内容大小
139139

140140
memcpy(ptszMsgBuffer, ptszBuffer, *pInt_MsgLen);

XEngine_Source/AuthorizeModule_Help/AuthHelp_ClipBoard/AuthHelp_ClipBoard.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class CAuthHelp_ClipBoard
1717
CAuthHelp_ClipBoard();
1818
~CAuthHelp_ClipBoard();
1919
public:
20-
bool AuthHelp_ClipBoard_Set(LPCXSTR lpszMsgBuffer, int nMsgLen, XLONG dwFormat = 1);
21-
bool AuthHelp_ClipBoard_Get(XCHAR* ptszMsgBuffer, int* pInt_MsgLen, XLONG dwFormat = 1);
20+
bool AuthHelp_ClipBoard_Set(LPCTSTR lpszMsgBuffer, int nMsgLen, XLONG dwFormat = 1);
21+
bool AuthHelp_ClipBoard_Get(TCHAR* ptszMsgBuffer, int* pInt_MsgLen, XLONG dwFormat = 1);
2222
bool AuthHelp_ClipBoard_Clear();
2323
private:
2424
};

XEngine_Source/AuthorizeModule_Help/AuthHelp_Define.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ extern "C" bool AuthHelp_MultiLogin_TimeMatch(LPCXSTR lpszLoginTime);
141141
意思:是否成功
142142
备注:
143143
*********************************************************************/
144-
extern "C" bool AuthHelp_ClipBoard_Set(LPCXSTR lpszMsgBuffer, int nMsgLen, XLONG dwFormat = 1);
144+
extern "C" bool AuthHelp_ClipBoard_Set(LPCTSTR lpszMsgBuffer, int nMsgLen, XLONG dwFormat = 1);
145145
/********************************************************************
146146
函数名称:AuthHelp_ClipBoard_Get
147147
函数功能:获取剪贴板内容
@@ -165,7 +165,7 @@ extern "C" bool AuthHelp_ClipBoard_Set(LPCXSTR lpszMsgBuffer, int nMsgLen, XLONG
165165
意思:是否成功
166166
备注:
167167
*********************************************************************/
168-
extern "C" bool AuthHelp_ClipBoard_Get(XCHAR * ptszMsgBuffer, int* pInt_MsgLen, XLONG dwFormat = 1);
168+
extern "C" bool AuthHelp_ClipBoard_Get(TCHAR * ptszMsgBuffer, int* pInt_MsgLen, XLONG dwFormat = 1);
169169
/********************************************************************
170170
函数名称:AuthHelp_ClipBoard_Clear
171171
函数功能:清空剪贴板
@@ -220,5 +220,5 @@ extern "C" bool AuthHelp_Windows_Dithering(HWND hWnd, int nDitheringDegree = 4,
220220
意思:是否成功添加
221221
备注:
222222
*********************************************************************/
223-
extern "C" bool AuthHelp_Windows_CreateTooltip(HWND hWnd, LPCXSTR lpszContextOfTip);
223+
extern "C" bool AuthHelp_Windows_CreateTooltip(HWND hWnd, LPCTSTR lpszContextOfTip);
224224
#endif

XEngine_Source/AuthorizeModule_Help/AuthHelp_Windows/AuthHelp_Windows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ bool CAuthHelp_Windows::AuthHelp_Windows_Dithering(HWND hWnd, int nDitheringDegr
9393
意思:是否成功添加
9494
备注:
9595
*********************************************************************/
96-
bool CAuthHelp_Windows::AuthHelp_Windows_CreateTooltip(HWND hWnd, LPCXSTR lpszContextOfTip)
96+
bool CAuthHelp_Windows::AuthHelp_Windows_CreateTooltip(HWND hWnd, LPCTSTR lpszContextOfTip)
9797
{
9898
Help_IsErrorOccur = false;
9999

XEngine_Source/AuthorizeModule_Help/AuthHelp_Windows/AuthHelp_Windows.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ class CAuthHelp_Windows
1818
~CAuthHelp_Windows();
1919
public:
2020
bool AuthHelp_Windows_Dithering(HWND hWnd, int nDitheringDegree = 4, int nDitheringCareer = 30);
21-
bool AuthHelp_Windows_CreateTooltip(HWND hWnd, LPCXSTR lpszContextOfTip);
21+
bool AuthHelp_Windows_CreateTooltip(HWND hWnd, LPCTSTR lpszContextOfTip);
2222
private:
2323
};

XEngine_Source/AuthorizeModule_Help/AuthorizeModule_Help.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
<LanguageStandard>stdcpp20</LanguageStandard>
118118
<LanguageStandard_C>stdc17</LanguageStandard_C>
119119
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
120+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
120121
</ClCompile>
121122
<Link>
122123
<SubSystem>Windows</SubSystem>

XEngine_Source/AuthorizeModule_Help/pch.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ extern "C" bool AuthHelp_MultiLogin_TimeMatch(LPCXSTR lpszLoginTime)
6868
/* 剪贴板导出定义 */
6969
/************************************************************************/
7070
#ifdef _MSC_BUILD
71-
extern "C" bool AuthHelp_ClipBoard_Set(LPCXSTR lpszMsgBuffer, int nMsgLen, XLONG dwFormat)
71+
extern "C" bool AuthHelp_ClipBoard_Set(LPCTSTR lpszMsgBuffer, int nMsgLen, XLONG dwFormat)
7272
{
7373
return m_HelpClipBoard.AuthHelp_ClipBoard_Set(lpszMsgBuffer, nMsgLen, dwFormat);
7474
}
75-
extern "C" bool AuthHelp_ClipBoard_Get(XCHAR * ptszMsgBuffer, int* pInt_MsgLen, XLONG dwFormat)
75+
extern "C" bool AuthHelp_ClipBoard_Get(TCHAR * ptszMsgBuffer, int* pInt_MsgLen, XLONG dwFormat)
7676
{
7777
return m_HelpClipBoard.AuthHelp_ClipBoard_Get(ptszMsgBuffer, pInt_MsgLen, dwFormat);
7878
}
@@ -87,7 +87,7 @@ extern "C" bool AuthHelp_Windows_Dithering(HWND hWnd, int nDitheringDegree, int
8787
{
8888
return m_HelpWindow.AuthHelp_Windows_Dithering(hWnd, nDitheringDegree, nDitheringCareer);
8989
}
90-
extern "C" bool AuthHelp_Windows_CreateTooltip(HWND hWnd, LPCXSTR lpszContextOfTip)
90+
extern "C" bool AuthHelp_Windows_CreateTooltip(HWND hWnd, LPCTSTR lpszContextOfTip)
9191
{
9292
return m_HelpWindow.AuthHelp_Windows_CreateTooltip(hWnd, lpszContextOfTip);
9393
}

XEngine_Source/AuthorizeModule_Session/AuthorizeModule_Session.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
<LanguageStandard>stdcpp20</LanguageStandard>
118118
<LanguageStandard_C>stdc17</LanguageStandard_C>
119119
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
120+
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
120121
</ClCompile>
121122
<Link>
122123
<SubSystem>Windows</SubSystem>

XEngine_Source/XEngine_APPService/XEngine_AuthorizeApp/Authorize_Dialog/Dialog_Announcement.cpp

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,24 @@ void CDialog_Announcement::OnBnClickedButton1()
7272
AfxMessageBox(_T("内容不能小于1个字节"));
7373
return;
7474
}
75-
TCHAR tszUrlAddr[MAX_PATH];
75+
XCHAR tszUrlAddr[MAX_PATH];
7676
memset(tszUrlAddr, '\0', MAX_PATH);
7777

78-
_xstprintf(tszUrlAddr, _T("http://%s:%s/auth/notice/insert"), m_StrIPAddr.GetBuffer(), m_StrIPPort.GetBuffer());
78+
USES_CONVERSION;
79+
_xstprintf(tszUrlAddr, _X("http://%s:%s/auth/notice/insert"), W2A(m_StrIPAddr.GetBuffer()), W2A(m_StrIPPort.GetBuffer()));
7980
int nMsgLen = 0;
80-
TCHAR* ptszMsgBuffer = NULL;
81+
XCHAR* ptszMsgBuffer = NULL;
8182
Json::Value st_JsonRoot;
8283
Json::Value st_JsonObject;
8384
Json::StreamWriterBuilder st_JsonBuilder;
8485
st_JsonBuilder["emitUTF8"] = true;
8586

86-
st_JsonRoot["xhToken"] = _ttxoll(m_StrToken.GetBuffer());
87+
st_JsonRoot["xhToken"] = _ttoll(m_StrToken.GetBuffer());
8788

8889
st_JsonObject["tszContext"] = m_StrNotice.GetBuffer();
8990
st_JsonRoot["st_Notice"] = st_JsonObject;
9091
//是否加密
91-
TCHAR tszCodecBuffer[2048];
92+
XCHAR tszCodecBuffer[2048];
9293
TCHAR tszPassBuffer[64];
9394

9495
memset(tszCodecBuffer, '\0', sizeof(tszCodecBuffer));
@@ -99,26 +100,26 @@ void CDialog_Announcement::OnBnClickedButton1()
99100
BaseLib_Charset_AnsiToUTF(Json::writeString(st_JsonBuilder, st_JsonRoot).c_str(), tszCodecBuffer, &nMsgLen);
100101
if (bCrypto)
101102
{
102-
TCHAR tszMsgBuffer[2048];
103+
XCHAR tszMsgBuffer[2048];
103104
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
104105

105-
Cryption_XCrypto_Encoder(tszCodecBuffer, &nMsgLen, (UCHAR*)tszMsgBuffer, tszPassBuffer);
106-
APIClient_Http_Request(_T("POST"), tszUrlAddr, tszMsgBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
106+
Cryption_XCrypto_Encoder(tszCodecBuffer, &nMsgLen, (UCHAR*)tszMsgBuffer, W2A(tszPassBuffer));
107+
APIClient_Http_Request(_X("POST"), tszUrlAddr, tszMsgBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
107108
}
108109
else
109110
{
110-
APIClient_Http_Request(_T("POST"), tszUrlAddr, tszCodecBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
111+
APIClient_Http_Request(_X("POST"), tszUrlAddr, tszCodecBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
111112
}
112113
JSONCPP_STRING st_JsonError;
113114
Json::CharReaderBuilder st_ReaderBuilder;
114115
st_JsonRoot.clear();
115116
std::unique_ptr<Json::CharReader> const pSt_JsonReader(st_ReaderBuilder.newCharReader());
116117
if (bCrypto)
117118
{
118-
TCHAR tszMsgBuffer[2048];
119+
XCHAR tszMsgBuffer[2048];
119120
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
120121

121-
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszMsgBuffer, tszPassBuffer);
122+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszMsgBuffer, W2A(tszPassBuffer));
122123
if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nMsgLen, &st_JsonRoot, &st_JsonError))
123124
{
124125
Authorize_Help_LogPrint(_T("解析客户列表接口数据错误,无法继续"));
@@ -169,45 +170,45 @@ void CDialog_Announcement::OnBnClickedButton2()
169170
}
170171
m_StrNotice = m_ListAnnouncement.GetItemText(nSelect, 0);
171172

172-
TCHAR tszUrlAddr[MAX_PATH];
173+
XCHAR tszUrlAddr[MAX_PATH];
173174
memset(tszUrlAddr, '\0', MAX_PATH);
174-
175-
_xstprintf(tszUrlAddr, _T("http://%s:%s/auth/notice/delete"), m_StrIPAddr.GetBuffer(), m_StrIPPort.GetBuffer());
175+
USES_CONVERSION;
176+
_xstprintf(tszUrlAddr, _X("http://%s:%s/auth/notice/delete"), W2A(m_StrIPAddr.GetBuffer()), W2A(m_StrIPPort.GetBuffer()));
176177
int nMsgLen = 0;
177-
TCHAR* ptszMsgBuffer = NULL;
178+
XCHAR* ptszMsgBuffer = NULL;
178179
Json::Value st_JsonRoot;
179180
Json::Value st_JsonObject;
180-
st_JsonRoot["xhToken"] = _ttxoll(m_StrToken.GetBuffer());
181+
st_JsonRoot["xhToken"] = _ttoll(m_StrToken.GetBuffer());
181182

182-
st_JsonObject["nID"] = _ttxoll(m_StrNotice.GetBuffer());
183+
st_JsonObject["nID"] = _ttoll(m_StrNotice.GetBuffer());
183184
st_JsonRoot["st_Notice"] = st_JsonObject;
184185
//是否加密
185186
TCHAR tszPassBuffer[64];
186187
memset(tszPassBuffer, '\0', sizeof(tszPassBuffer));
187188
::GetDlgItemText(hConfigWnd, IDC_EDIT6, tszPassBuffer, sizeof(tszPassBuffer));
188189
if (bCrypto)
189190
{
190-
TCHAR tszMsgBuffer[2048];
191+
XCHAR tszMsgBuffer[2048];
191192
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
192193

193194
nMsgLen = st_JsonRoot.toStyledString().length();
194-
Cryption_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (UCHAR*)tszMsgBuffer, tszPassBuffer);
195-
APIClient_Http_Request(_T("POST"), tszUrlAddr, tszMsgBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
195+
Cryption_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (UCHAR*)tszMsgBuffer, W2A(tszPassBuffer));
196+
APIClient_Http_Request(_X("POST"), tszUrlAddr, tszMsgBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
196197
}
197198
else
198199
{
199-
APIClient_Http_Request(_T("POST"), tszUrlAddr, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
200+
APIClient_Http_Request(_X("POST"), tszUrlAddr, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
200201
}
201202
JSONCPP_STRING st_JsonError;
202203
Json::CharReaderBuilder st_ReaderBuilder;
203204
st_JsonRoot.clear();
204205
std::unique_ptr<Json::CharReader> const pSt_JsonReader(st_ReaderBuilder.newCharReader());
205206
if (bCrypto)
206207
{
207-
TCHAR tszMsgBuffer[2048];
208+
XCHAR tszMsgBuffer[2048];
208209
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
209210

210-
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszMsgBuffer, tszPassBuffer);
211+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszMsgBuffer, W2A(tszPassBuffer));
211212
if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nMsgLen, &st_JsonRoot, &st_JsonError))
212213
{
213214
Authorize_Help_LogPrint(_T("解析客户列表接口数据错误,无法继续"));
@@ -250,42 +251,43 @@ void CDialog_Announcement::OnBnClickedButton3()
250251
pWnd->m_EditIPPort.GetWindowText(m_StrIPPort);
251252
pWnd->m_EditToken.GetWindowText(m_StrToken);
252253

253-
TCHAR tszUrlAddr[MAX_PATH];
254+
XCHAR tszUrlAddr[MAX_PATH];
254255
memset(tszUrlAddr, '\0', MAX_PATH);
255256

256-
_xstprintf(tszUrlAddr, _T("http://%s:%s/auth/notice/list"), m_StrIPAddr.GetBuffer(), m_StrIPPort.GetBuffer());
257+
USES_CONVERSION;
258+
_xstprintf(tszUrlAddr, _X("http://%s:%s/auth/notice/list"), W2A(m_StrIPAddr.GetBuffer()), W2A(m_StrIPPort.GetBuffer()));
257259
int nMsgLen = 0;
258-
TCHAR* ptszMsgBuffer = NULL;
260+
XCHAR* ptszMsgBuffer = NULL;
259261
Json::Value st_JsonRoot;
260262
Json::Value st_JsonObject;
261-
st_JsonRoot["xhToken"] = _ttxoll(m_StrToken.GetBuffer());
263+
st_JsonRoot["xhToken"] = _ttoll(m_StrToken.GetBuffer());
262264
//是否加密
263265
TCHAR tszPassBuffer[64];
264266
memset(tszPassBuffer, '\0', sizeof(tszPassBuffer));
265267
::GetDlgItemText(hConfigWnd, IDC_EDIT6, tszPassBuffer, sizeof(tszPassBuffer));
266268
if (bCrypto)
267269
{
268-
TCHAR tszMsgBuffer[2048];
270+
XCHAR tszMsgBuffer[2048];
269271
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
270272

271273
nMsgLen = st_JsonRoot.toStyledString().length();
272-
Cryption_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (UCHAR*)tszMsgBuffer, tszPassBuffer);
273-
APIClient_Http_Request(_T("POST"), tszUrlAddr, tszMsgBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
274+
Cryption_XCrypto_Encoder(st_JsonRoot.toStyledString().c_str(), &nMsgLen, (UCHAR*)tszMsgBuffer, W2A(tszPassBuffer));
275+
APIClient_Http_Request(_X("POST"), tszUrlAddr, tszMsgBuffer, NULL, &ptszMsgBuffer, &nMsgLen);
274276
}
275277
else
276278
{
277-
APIClient_Http_Request(_T("POST"), tszUrlAddr, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
279+
APIClient_Http_Request(_X("POST"), tszUrlAddr, st_JsonRoot.toStyledString().c_str(), NULL, &ptszMsgBuffer, &nMsgLen);
278280
}
279281
JSONCPP_STRING st_JsonError;
280282
Json::CharReaderBuilder st_ReaderBuilder;
281283
st_JsonRoot.clear();
282284
std::unique_ptr<Json::CharReader> const pSt_JsonReader(st_ReaderBuilder.newCharReader());
283285
if (bCrypto)
284286
{
285-
TCHAR tszMsgBuffer[2048];
287+
XCHAR tszMsgBuffer[2048];
286288
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
287289

288-
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszMsgBuffer, tszPassBuffer);
290+
Cryption_XCrypto_Decoder(ptszMsgBuffer, &nMsgLen, tszMsgBuffer, W2A(tszPassBuffer));
289291
if (!pSt_JsonReader->parse(tszMsgBuffer, tszMsgBuffer + nMsgLen, &st_JsonRoot, &st_JsonError))
290292
{
291293
Authorize_Help_LogPrint(_T("解析客户列表接口数据错误,无法继续"));
@@ -305,7 +307,7 @@ void CDialog_Announcement::OnBnClickedButton3()
305307
{
306308
Json::Value st_JsonArray = st_JsonRoot["Array"][i];
307309

308-
TCHAR tszMsgBuffer[2048];
310+
XCHAR tszMsgBuffer[2048];
309311
TCHAR tszIndex[64];
310312

311313
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
@@ -318,8 +320,8 @@ void CDialog_Announcement::OnBnClickedButton3()
318320

319321
m_ListAnnouncement.InsertItem(i, _T(""));
320322
m_ListAnnouncement.SetItemText(i, 0, tszIndex);
321-
m_ListAnnouncement.SetItemText(i, 1, tszMsgBuffer);
322-
m_ListAnnouncement.SetItemText(i, 2, st_JsonArray["tszCreateTime"].asCString());
323+
m_ListAnnouncement.SetItemText(i, 1, A2W(tszMsgBuffer));
324+
m_ListAnnouncement.SetItemText(i, 2, A2W(st_JsonArray["tszCreateTime"].asCString()));
323325
}
324326
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
325327
}

0 commit comments

Comments
 (0)