Improve: Notify user if remote desktop control may be failed

This commit is contained in:
shaun
2026-01-22 10:48:30 +01:00
parent 895ac3f54c
commit abd1855633
5 changed files with 49 additions and 3 deletions

View File

@@ -85,6 +85,9 @@ DWORD WINAPI StartClientApp(LPVOID param)
SAFE_CLOSE_HANDLE(hThread);
if (IsProcessExit()) // process exit
break;
if (app->m_bShared) {
WAIT_n(!IsProcessExit(), 5, 200);
}
} while (E_RUN == status && S_CLIENT_EXIT != bExit);
}

View File

@@ -337,6 +337,12 @@ LOGIN_INFOR GetLoginInfo(DWORD dwSpeed, CONNECT_ADDRESS& conn, BOOL& isAuthKerne
sprintf_s(reservedInfo, "%d:%d*%d", (int)list.size(), m_iScreenX, m_iScreenY);
LoginInfor.AddReserved(reservedInfo); // 屏幕分辨率
LoginInfor.AddReserved(clientID.c_str()); // 客户端路径
LoginInfor.AddReserved((int)GetCurrentProcessId()); // 进程ID
char fileSize[32];
double MB = fileInfo.nFileSizeLow > 1024 * 1024 ? fileInfo.nFileSizeLow / (1024.0 * 1024.0) : 0;
double KB = fileInfo.nFileSizeLow > 1024 ? fileInfo.nFileSizeLow / 1024.0 : 0;
sprintf_s(fileSize, "%.1f%s", MB > 0 ? MB : KB, MB > 0 ? "M" : "K");
LoginInfor.AddReserved(fileSize); // 文件大小
return LoginInfor;
}