Fix: TestRun run as windows service can't unlock screen

This commit is contained in:
shaun
2025-12-29 17:54:47 +01:00
committed by yuanyuanxiang
parent 4ae97abcc6
commit 2b4f061f82
13 changed files with 92 additions and 26 deletions

View File

@@ -17,6 +17,8 @@ bool LaunchApplication(TCHAR* pszApplicationFilePath, TCHAR* pszDesktopName);
bool IsWindows8orHigher();
BOOL IsRunningAsSystem();
class IOCPClient;
struct UserParam;
@@ -58,8 +60,17 @@ public:
}
bool IsRunAsService() const
{
return m_conn ? m_conn->iStartup == Startup_GhostMsc : false;
if (m_conn && (m_conn->iStartup == Startup_GhostMsc || m_conn->iStartup == Startup_TestRunMsc))
return true;
static BOOL is_run_as_system = IsRunningAsSystem();
return is_run_as_system;
}
// <20><>ȡ<EFBFBD><C8A1>ǰ<EFBFBD><EFBFBD><EEB6AF><EFBFBD><EFBFBD><E6A3A8>дȨ<D0B4>ޣ<EFBFBD><DEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȱ<EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD>
// ʹ<>ö<EFBFBD><C3B6><EFBFBD><EFBFBD>ľ<EFBFBD>̬<EFBFBD><CCAC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>WorkThreadProc<6F><63>g_hDesk<73><6B><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͻ
HDESK s_inputDesk = NULL;
clock_t s_lastCheck = 0;
DWORD s_lastThreadId = 0;
bool SwitchScreen();
virtual BOOL OnReconnect();
uint64_t m_DlgID = 0;