/
githubmirror
/
PowerToys
Обзор
Документация
Войти
/
githubmirror
/
PowerToys
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tools/module_loader/src/ConsoleHost.h
38 строк
980 B
Mike Hall
Module Loader tool for rapid testing of modules (#43813)
26 ноя 2025, 17:08
Не верифицирован
26 ноя 2025, 17:08
452e0dc
Код
Авторство
О чём код?
// Copyright (c) Microsoft Corporation // The Microsoft Corporation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #pragma once #include <Windows.h> #include "ModuleLoader.h" #include "HotkeyManager.h" /// <summary> /// Console host that runs the message loop and handles Ctrl+C /// </summary> class ConsoleHost { public: ConsoleHost(ModuleLoader& moduleLoader, HotkeyManager& hotkeyManager); ~ConsoleHost(); // Prevent copying ConsoleHost(const ConsoleHost&) = delete; ConsoleHost& operator=(const ConsoleHost&) = delete; /// <summary> /// Run the message loop until Ctrl+C is pressed /// </summary> void Run(); private: ModuleLoader& m_moduleLoader; HotkeyManager& m_hotkeyManager; static bool s_exitRequested; /// <summary> /// Console control handler (for Ctrl+C) /// </summary> static BOOL WINAPI ConsoleCtrlHandler(DWORD ctrlType); };