mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-24 00:03:10 +08:00
Improve: Notify user if remote desktop control may be failed
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user