Skip to content

Commit 7ef5ac0

Browse files
committed
update:match xengine v9.x for example
1 parent e9d1028 commit 7ef5ac0

22 files changed

Lines changed: 54 additions & 54 deletions

File tree

XEngine_APPClient/APPClient_BackExample/APPClient_BackExample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int test_query()
4040
return 0;
4141
}
4242
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
43-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
43+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
4444

4545
return 0;
4646
}

XEngine_APPClient/APPClient_BankExample/APPClient_BankExample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int main()
3737
return 0;
3838
}
3939
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
40-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
40+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
4141

4242
#ifdef _MSC_BUILD
4343
WSACleanup();

XEngine_APPClient/APPClient_DTestExample/APPClient_DTestExample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int main()
3737
return 0;
3838
}
3939
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
40-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
40+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
4141

4242
#ifdef _MSC_BUILD
4343
WSACleanup();

XEngine_APPClient/APPClient_DeamonExample/APPClient_DeamonExample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int test_insert()
4343
return 0;
4444
}
4545
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
46-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
46+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
4747

4848
return 0;
4949
}

XEngine_APPClient/APPClient_IDExample/APPClient_IDExample.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ int main()
3838
}
3939
#ifdef _MSC_BUILD
4040
XCHAR tszGBKBuffer[1024] = {};
41-
BaseLib_OperatorCharset_UTFToAnsi(ptszMsgBuffer, tszGBKBuffer, &nLen);
41+
BaseLib_Charset_UTFToAnsi(ptszMsgBuffer, tszGBKBuffer, &nLen);
4242
printf("接受到数据,大小:%d,内容:%s\n", nLen, tszGBKBuffer);
4343
#else
4444
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
4545
#endif
4646

47-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
47+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
4848

4949
#ifdef _MSC_BUILD
5050
WSACleanup();

XEngine_APPClient/APPClient_IPExample/APPClient_IPExample.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ int main()
3939
XCHAR tszMsgBuffer[2048];
4040
memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
4141

42-
BaseLib_OperatorCharset_UTFToAnsi(ptszMsgBuffer, tszMsgBuffer, &nLen);
42+
BaseLib_Charset_UTFToAnsi(ptszMsgBuffer, tszMsgBuffer, &nLen);
4343
printf("接受到数据,大小:%d,内容:%s\n", nLen, tszMsgBuffer);
44-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
44+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
4545

4646
#ifdef _MSC_BUILD
4747
WSACleanup();

XEngine_APPClient/APPClient_ImageExample/APPClient_ImageExample.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ bool APPClient_ImageExample_GetAttr(LPCXSTR lpszMsgBuffer, int nMsgLen, int* pIn
4949
printf("json parse failed\n");
5050
return false;
5151
}
52-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
52+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
5353

5454
Json::Value st_JsonBase = st_JsonRoot["st_BaseInfo"];
5555
*pInt_Width = st_JsonBase["nWidth"].asInt();
@@ -85,7 +85,7 @@ int test_imgzoom()
8585
XCHAR tszAPIUrl[MAX_PATH] = {};
8686
XCHAR tszFileExt[64] = {};
8787

88-
BaseLib_OperatorString_GetFileAndPath(pptszListFile[i], NULL, NULL, NULL, tszFileExt);
88+
BaseLib_String_GetFileAndPath(pptszListFile[i], NULL, NULL, NULL, tszFileExt);
8989
_xstprintf(tszAPIUrl, _X("http://127.0.0.1:5501/api?function=image&type=1&ext=%s&width=%d&height=%d"), tszFileExt, nWidth / 2, nHeight / 2);
9090

9191
XCHAR* ptszMsgBuffer = NULL;
@@ -100,7 +100,7 @@ int test_imgzoom()
100100
fwrite(ptszMsgBuffer, 1, nRet, pSt_File);
101101
fclose(pSt_File);
102102

103-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
103+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
104104
}
105105
return 0;
106106
}

XEngine_APPClient/APPClient_LanguageExample/APPClient_LanguageExample.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ int main()
3737
return 0;
3838
}
3939
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
40-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
40+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
4141

4242
#ifdef _MSC_BUILD
4343
WSACleanup();

XEngine_APPClient/APPClient_LibPluginExample/APPClient_LibPluginExample.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ int main()
3535
return 0;
3636
}
3737
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
38-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
38+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
3939

4040
LPCXSTR lpszZodiacUrl = _X("http://127.0.0.1:5501/api?function=zodiac&params1=19880121");
4141
if (!APIClient_Http_Request(_X("GET"), lpszZodiacUrl, NULL, NULL, &ptszMsgBuffer, &nLen))
@@ -44,7 +44,7 @@ int main()
4444
return 0;
4545
}
4646
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
47-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
47+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
4848

4949
LPCXSTR lpszTimeUrl = _X("http://127.0.0.1:5501/api?function=timezone&params1=1&params2=1-20");
5050
if (!APIClient_Http_Request(_X("GET"), lpszTimeUrl, NULL, NULL, &ptszMsgBuffer, &nLen))
@@ -53,7 +53,7 @@ int main()
5353
return 0;
5454
}
5555
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
56-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
56+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
5757

5858
LPCXSTR lpszBmiUrl = _X("http://127.0.0.1:5501/api?function=bmindex&params1=1.78&params2=62");
5959
if (!APIClient_Http_Request(_X("GET"), lpszBmiUrl, NULL, NULL, &ptszMsgBuffer, &nLen))
@@ -62,7 +62,7 @@ int main()
6262
return 0;
6363
}
6464
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszMsgBuffer);
65-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
65+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
6666
#ifdef _MSC_BUILD
6767
WSACleanup();
6868
#endif

XEngine_APPClient/APPClient_LockExample/APPClient_LockExample.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int main()
3636
return 0;
3737
}
3838
printf("接受到数据,大小:%d,内容:%s\n", nLen, ptszBuffer);
39-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszBuffer);
39+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszBuffer);
4040
//打开读锁
4141
LPCXSTR lpszReadUrl = _X("http://127.0.0.1:5501/api?function=lock&params1=1000106561&params2=3");
4242
if (!APIClient_Http_Request(_X("GET"), lpszReadUrl, NULL, NULL, &ptszBuffer, &nLen))
@@ -45,7 +45,7 @@ int main()
4545
return 0;
4646
}
4747
printf("接受到数据,大小:%d,内容:\n%s\n", nLen, ptszBuffer);
48-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszBuffer);
48+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszBuffer);
4949
//打开写锁
5050
LPCXSTR lpszWriteUrl = _X("http://127.0.0.1:5501/api?function=lock&params1=1000106561&params2=5");
5151
if (!APIClient_Http_Request(_X("GET"), lpszWriteUrl, NULL, NULL, &ptszBuffer, &nLen))
@@ -54,7 +54,7 @@ int main()
5454
return 0;
5555
}
5656
printf("接受到数据,大小:%d,内容:\n%s\n", nLen, ptszBuffer);
57-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszBuffer);
57+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszBuffer);
5858
//释放读锁
5959
LPCXSTR lpszUNReadUrl = _X("http://127.0.0.1:5501/api?function=lock&params1=1000106561&params2=4");
6060
if (!APIClient_Http_Request(_X("GET"), lpszUNReadUrl, NULL, NULL, &ptszBuffer, &nLen))
@@ -63,15 +63,15 @@ int main()
6363
return 0;
6464
}
6565
printf("接受到数据,大小:%d,内容:\n%s\n", nLen, ptszBuffer);
66-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszBuffer);
66+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszBuffer);
6767
//打开解锁
6868
if (!APIClient_Http_Request(_X("GET"), lpszWriteUrl, NULL, NULL, &ptszBuffer, &nLen))
6969
{
7070
printf("发送投递失败!\n");
7171
return 0;
7272
}
7373
printf("接受到数据,大小:%d,内容:\n%s\n", nLen, ptszBuffer);
74-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszBuffer);
74+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszBuffer);
7575
//关闭
7676
LPCXSTR lpszCloseUrl = _X("http://127.0.0.1:5501/api?function=lock&params1=1000106561&params2=2");
7777
if (!APIClient_Http_Request(_X("GET"), lpszCloseUrl, NULL, NULL, &ptszBuffer, &nLen))
@@ -80,7 +80,7 @@ int main()
8080
return 0;
8181
}
8282
printf("接受到数据,大小:%d,内容:\n%s\n", nLen, ptszBuffer);
83-
BaseLib_OperatorMemory_FreeCStyle((XPPMEM)&ptszBuffer);
83+
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszBuffer);
8484
#ifdef _MSC_BUILD
8585
WSACleanup();
8686
#endif

0 commit comments

Comments
 (0)