From cd45164e40080527cf778e5bb47c6132dbe0bc1a Mon Sep 17 00:00:00 2001 From: Nick Bolton Date: Tue, 11 Mar 2025 12:18:31 +0000 Subject: [PATCH] chore: Clean up unused definitions and includes in ArchMiscWindows --- src/lib/arch/win32/ArchMiscWindows.cpp | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/lib/arch/win32/ArchMiscWindows.cpp b/src/lib/arch/win32/ArchMiscWindows.cpp index 570dcd225..9bfabde40 100644 --- a/src/lib/arch/win32/ArchMiscWindows.cpp +++ b/src/lib/arch/win32/ArchMiscWindows.cpp @@ -1,6 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility - * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. + * SPDX-FileCopyrightText: (C) 2012 - 2016, 2024 - 2025 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception */ @@ -13,8 +13,6 @@ #include "base/String.h" #include -#include -#include #include #include @@ -37,20 +35,6 @@ const auto kRequiredMinor = 27; #define MS_LOG_DEBUG(message, ...) \ OutputDebugStringA((deskflow::string::sprintf((s_binaryName + ": " + message + "\n").c_str(), __VA_ARGS__)).c_str()) -// parent process name for services in Vista -#define SERVICE_LAUNCHER "services.exe" - -#ifndef ES_SYSTEM_REQUIRED -#define ES_SYSTEM_REQUIRED ((DWORD)0x00000001) -#endif -#ifndef ES_DISPLAY_REQUIRED -#define ES_DISPLAY_REQUIRED ((DWORD)0x00000002) -#endif -#ifndef ES_CONTINUOUS -#define ES_CONTINUOUS ((DWORD)0x80000000) -#endif -using EXECUTION_STATE = DWORD; - // // Free functions // @@ -384,7 +368,7 @@ void ArchMiscWindows::setThreadExecutionState(DWORD busyModes) } // convert to STES form - EXECUTION_STATE state = 0; + DWORD state = 0; if ((busyModes & kSYSTEM) != 0) { state |= ES_SYSTEM_REQUIRED; } @@ -435,7 +419,7 @@ bool ArchMiscWindows::wasLaunchedAsService() return false; } - return (name == SERVICE_LAUNCHER); + return (name == "services.exe"); } bool ArchMiscWindows::getParentProcessName(std::string &name)