solve some issues according to code analysis result

This commit is contained in:
yuanyuanxiang
2024-12-27 01:40:40 +08:00
parent cdded1687d
commit a2975d9471
19 changed files with 106 additions and 50 deletions

View File

@@ -108,6 +108,9 @@ extern "C" __declspec(dllexport) void TestRun(char* szServerIP,int uPort)
g_uPort = uPort;
HANDLE hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)StartClient,NULL,0,NULL);
if (hThread == NULL) {
return;
}
#ifdef _DEBUG
WaitForSingleObject(hThread, 200);
#else
@@ -134,14 +137,14 @@ DWORD WINAPI StartClient(LPVOID lParam)
g_bThreadExit = false;
while (!g_bExit)
{
DWORD dwTickCount = GetTickCount();
DWORD dwTickCount = GetTickCount64();
if (!ClientObject->ConnectServer(g_szServerIP, g_uPort))
{
for (int k = 500; !g_bExit && --k; Sleep(10));
continue;
}
//׼<><D7BC><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
SendLoginInfo(ClientObject, GetTickCount()-dwTickCount);
SendLoginInfo(ClientObject, GetTickCount64()-dwTickCount);
CKernelManager Manager(ClientObject);
bool bIsRun = 0;