diff --git a/PowerToys.sln b/PowerToys.sln index 4af72870f9..2ddb15288d 100644 --- a/PowerToys.sln +++ b/PowerToys.sln @@ -510,8 +510,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CropAndLock", "CropAndLock" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CropAndLock", "src\modules\CropAndLock\CropAndLock\CropAndLock.vcxproj", "{F5E1146E-B7B3-4E11-85FD-270A500BD78C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CropAndLockModuleInterface", "src\modules\CropAndLock\CropAndLockModuleInterface\CropAndLockModuleInterface.vcxproj", "{3157FA75-86CF-4EE2-8F62-C43F776493C6}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EnvironmentVariables", "EnvironmentVariables", "{538ED0BB-B863-4B20-98CC-BCDF7FA0B68A}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EnvironmentVariablesUILib", "src\modules\EnvironmentVariables\EnvironmentVariablesUILib\EnvironmentVariablesUILib.csproj", "{51465DA1-C18B-4B99-93E1-ECF8E0FA0CBA}" @@ -2049,14 +2047,6 @@ Global {F5E1146E-B7B3-4E11-85FD-270A500BD78C}.Release|ARM64.Build.0 = Release|ARM64 {F5E1146E-B7B3-4E11-85FD-270A500BD78C}.Release|x64.ActiveCfg = Release|x64 {F5E1146E-B7B3-4E11-85FD-270A500BD78C}.Release|x64.Build.0 = Release|x64 - {3157FA75-86CF-4EE2-8F62-C43F776493C6}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {3157FA75-86CF-4EE2-8F62-C43F776493C6}.Debug|ARM64.Build.0 = Debug|ARM64 - {3157FA75-86CF-4EE2-8F62-C43F776493C6}.Debug|x64.ActiveCfg = Debug|x64 - {3157FA75-86CF-4EE2-8F62-C43F776493C6}.Debug|x64.Build.0 = Debug|x64 - {3157FA75-86CF-4EE2-8F62-C43F776493C6}.Release|ARM64.ActiveCfg = Release|ARM64 - {3157FA75-86CF-4EE2-8F62-C43F776493C6}.Release|ARM64.Build.0 = Release|ARM64 - {3157FA75-86CF-4EE2-8F62-C43F776493C6}.Release|x64.ActiveCfg = Release|x64 - {3157FA75-86CF-4EE2-8F62-C43F776493C6}.Release|x64.Build.0 = Release|x64 {51465DA1-C18B-4B99-93E1-ECF8E0FA0CBA}.Debug|ARM64.ActiveCfg = Debug|Any CPU {51465DA1-C18B-4B99-93E1-ECF8E0FA0CBA}.Debug|ARM64.Build.0 = Debug|Any CPU {51465DA1-C18B-4B99-93E1-ECF8E0FA0CBA}.Debug|x64.ActiveCfg = Debug|Any CPU @@ -3142,7 +3132,6 @@ Global {90F9FA90-2C20-4004-96E6-F3B78151F5A5} = {B9617A31-0F0A-4397-851D-BF2FBEE32D7F} {3B227528-4BA6-4CAF-B44A-A10C78A64849} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} {F5E1146E-B7B3-4E11-85FD-270A500BD78C} = {3B227528-4BA6-4CAF-B44A-A10C78A64849} - {3157FA75-86CF-4EE2-8F62-C43F776493C6} = {3B227528-4BA6-4CAF-B44A-A10C78A64849} {538ED0BB-B863-4B20-98CC-BCDF7FA0B68A} = {4574FDD0-F61D-4376-98BF-E5A1262C11EC} {51465DA1-C18B-4B99-93E1-ECF8E0FA0CBA} = {538ED0BB-B863-4B20-98CC-BCDF7FA0B68A} {B9420661-B0E4-4241-ABD4-4A27A1F64250} = {538ED0BB-B863-4B20-98CC-BCDF7FA0B68A} diff --git a/src/RunnerV2/RunnerV2/ModuleInterfaces/CropAndLockModuleInterface.cs b/src/RunnerV2/RunnerV2/ModuleInterfaces/CropAndLockModuleInterface.cs new file mode 100644 index 0000000000..5ee3f52806 --- /dev/null +++ b/src/RunnerV2/RunnerV2/ModuleInterfaces/CropAndLockModuleInterface.cs @@ -0,0 +1,80 @@ +// 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. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.Reflection; +using System.Text.Json; +using ManagedCommon; +using Microsoft.PowerToys.Settings.UI.Library; +using PowerToys.GPOWrapper; +using RunnerV2.Helpers; + +namespace RunnerV2.ModuleInterfaces +{ + internal sealed partial class CropAndLockModuleInterface : IPowerToysModule, IDisposable + { + public string Name => "CropAndLock"; + + public bool Enabled => new SettingsUtils().GetSettings().Enabled.CropAndLock; + + public GpoRuleConfigured GpoRuleConfigured => GPOWrapper.GetConfiguredCropAndLockEnabledValue(); + + private InteropEvent _reparentEvent = new(InteropEvent.CropAndLockReparent); + private InteropEvent _thumbnailEvent = new(InteropEvent.CropAndLockThumbnail); + private InteropEvent _terminateEvent = new(InteropEvent.CropAndLockTerminate); + + public void Disable() + { + _terminateEvent.Fire(); + _reparentEvent.Dispose(); + _thumbnailEvent.Dispose(); + _terminateEvent.Dispose(); + ProcessHelper.ScheudleProcessKill("PowerToys.CropAndLock"); + } + + public void Enable() + { + EnsureLaunched(); + _reparentEvent = new(InteropEvent.CropAndLockReparent); + _thumbnailEvent = new(InteropEvent.CropAndLockThumbnail); + _terminateEvent = new(InteropEvent.CropAndLockTerminate); + PopulateShortcuts(); + } + + private void EnsureLaunched() + { + Process[] processes = Process.GetProcessesByName("PowerToys.CropAndLock"); + if (processes.Length == 0) + { + Process.Start("PowerToys.CropAndLock.exe", Environment.ProcessId.ToString(CultureInfo.InvariantCulture)); + } + } + + public void PopulateShortcuts() + { + Shortcuts.Clear(); + var settings = new SettingsUtils().GetSettings(Name); + Shortcuts.Add((settings.Properties.ThumbnailHotkey.Value, _thumbnailEvent.Fire)); + Shortcuts.Add((settings.Properties.ReparentHotkey.Value, _reparentEvent.Fire)); + } + + public void OnSettingsChanged(string settingsKind, JsonElement jsonProperties) + { + PopulateShortcuts(); + } + + public List<(HotkeySettings Hotkey, Action Action)> Shortcuts { get; } = []; + + public void Dispose() + { + GC.SuppressFinalize(this); + _reparentEvent.Dispose(); + _thumbnailEvent.Dispose(); + _terminateEvent.Dispose(); + } + } +} diff --git a/src/RunnerV2/RunnerV2/Runner.cs b/src/RunnerV2/RunnerV2/Runner.cs index a9ad773826..7d233da34c 100644 --- a/src/RunnerV2/RunnerV2/Runner.cs +++ b/src/RunnerV2/RunnerV2/Runner.cs @@ -42,6 +42,7 @@ namespace RunnerV2 new CmdNotFoundModuleInterface(), new ColorPickerModuleInterface(), new CommandPaletteModuleInterface(), + new CropAndLockModuleInterface(), ]; internal static bool Run(Action afterInitializationAction) diff --git a/src/common/ManagedCommon/InteropEvent.cs b/src/common/ManagedCommon/InteropEvent.cs index bddd9c6112..6944ca772d 100644 --- a/src/common/ManagedCommon/InteropEvent.cs +++ b/src/common/ManagedCommon/InteropEvent.cs @@ -15,6 +15,9 @@ namespace ManagedCommon public const string ColorPickerShow = "Local\\ShowColorPickerEvent-8c46be2a-3e05-4186-b56b-4ae986ef2525"; public const string ColorPickerTerminate = "Local\\TerminateColorPickerEvent-3d676258-c4d5-424e-a87a-4be22020e813"; public const string SettingsTerminate = "Local\\PowerToysRunnerTerminateSettingsEvent-c34cb661-2e69-4613-a1f8-4e39c25d7ef6"; + public const string CropAndLockReparent = "Local\\PowerToysCropAndLockReparentEvent-6060860a-76a1-44e8-8d0e-6355785e9c36"; + public const string CropAndLockThumbnail = "Local\\PowerToysCropAndLockThumbnailEvent-1637be50-da72-46b2-9220-b32b206b2434"; + public const string CropAndLockTerminate = "Local\\PowerToysCropAndLockExitEvent-d995d409-7b70-482b-bad6-e7c8666f375a"; private IntPtr _eventHandle; diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.rc b/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.rc deleted file mode 100644 index 5fa3c8b90d..0000000000 --- a/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.rc +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include "resource.h" -#include "../../../common/version/version.h" - -#define APSTUDIO_READONLY_SYMBOLS -#include "winres.h" -#undef APSTUDIO_READONLY_SYMBOLS - -1 VERSIONINFO -FILEVERSION FILE_VERSION -PRODUCTVERSION PRODUCT_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG -#else -FILEFLAGS 0x0L -#endif -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_DLL -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset - BEGIN - VALUE "CompanyName", COMPANY_NAME - VALUE "FileDescription", FILE_DESCRIPTION - VALUE "FileVersion", FILE_VERSION_STRING - VALUE "InternalName", INTERNAL_NAME - VALUE "LegalCopyright", COPYRIGHT_NOTE - VALUE "OriginalFilename", ORIGINAL_FILENAME - VALUE "ProductName", PRODUCT_NAME - VALUE "ProductVersion", PRODUCT_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset - END -END diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj b/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj deleted file mode 100644 index c7fccf462a..0000000000 --- a/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj +++ /dev/null @@ -1,118 +0,0 @@ - - - - - 16.0 - Win32Proj - {3157fa75-86cf-4ee2-8f62-c43f776493c6} - CropAndLockModuleInterface - CropAndLockModuleInterface - - - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - - - - - - - - - - - ..\..\..\..\$(Platform)\$(Configuration)\ - PowerToys.CropAndLockModuleInterface - - - - ..\;$(SolutionDir)src\common\Telemetry;$(SolutionDir)src;%(AdditionalIncludeDirectories) - - - $(OutDir)$(TargetName)$(TargetExt) - %(AdditionalDependencies) - - - - - true - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - - - Windows - true - false - - - - - true - true - true - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - - - Windows - true - true - true - false - - - - - - - - - - - - - - - - Create - - - - - - - - {d9b8fc84-322a-4f9f-bbb9-20915c47ddfd} - - - {6955446d-23f7-4023-9bb3-8657f904af99} - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - \ No newline at end of file diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj.filters b/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj.filters deleted file mode 100644 index c249fbe065..0000000000 --- a/src/modules/CropAndLock/CropAndLockModuleInterface/CropAndLockModuleInterface.vcxproj.filters +++ /dev/null @@ -1,53 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - - - - - - - \ No newline at end of file diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/dllmain.cpp b/src/modules/CropAndLock/CropAndLockModuleInterface/dllmain.cpp deleted file mode 100644 index 42c7c6da7e..0000000000 --- a/src/modules/CropAndLock/CropAndLockModuleInterface/dllmain.cpp +++ /dev/null @@ -1,334 +0,0 @@ -#include "pch.h" - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include -#include - -namespace NonLocalizable -{ - const wchar_t ModulePath[] = L"PowerToys.CropAndLock.exe"; -} - -namespace -{ - const wchar_t JSON_KEY_PROPERTIES[] = L"properties"; - const wchar_t JSON_KEY_WIN[] = L"win"; - const wchar_t JSON_KEY_ALT[] = L"alt"; - const wchar_t JSON_KEY_CTRL[] = L"ctrl"; - const wchar_t JSON_KEY_SHIFT[] = L"shift"; - const wchar_t JSON_KEY_CODE[] = L"code"; - const wchar_t JSON_KEY_REPARENT_HOTKEY[] = L"reparent-hotkey"; - const wchar_t JSON_KEY_THUMBNAIL_HOTKEY[] = L"thumbnail-hotkey"; - const wchar_t JSON_KEY_VALUE[] = L"value"; -} - -BOOL APIENTRY DllMain( HMODULE /*hModule*/, - DWORD ul_reason_for_call, - LPVOID /*lpReserved*/ - ) -{ - switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - Trace::CropAndLock::RegisterProvider(); - break; - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - break; - case DLL_PROCESS_DETACH: - Trace::CropAndLock::UnregisterProvider(); - break; - } - return TRUE; - -} - -class CropAndLockModuleInterface : public PowertoyModuleIface -{ -public: - // Return the localized display name of the powertoy - virtual PCWSTR get_name() override - { - return app_name.c_str(); - } - - // Return the non localized key of the powertoy, this will be cached by the runner - virtual const wchar_t* get_key() override - { - return app_key.c_str(); - } - - // Return the configured status for the gpo policy for the module - virtual powertoys_gpo::gpo_rule_configured_t gpo_policy_enabled_configuration() override - { - return powertoys_gpo::getConfiguredCropAndLockEnabledValue(); - } - - // Return JSON with the configuration options. - // These are the settings shown on the settings page along with their current values. - virtual bool get_config(wchar_t* buffer, int* buffer_size) override - { - HINSTANCE hinstance = reinterpret_cast(&__ImageBase); - - // Create a Settings object. - PowerToysSettings::Settings settings(hinstance, get_name()); - - return settings.serialize_to_buffer(buffer, buffer_size); - } - - // Passes JSON with the configuration settings for the powertoy. - // This is called when the user hits Save on the settings page. - virtual void set_config(const wchar_t* config) override - { - try - { - // Parse the input JSON string. - PowerToysSettings::PowerToyValues values = - PowerToysSettings::PowerToyValues::from_json_string(config, get_key()); - - parse_hotkey(values); - - values.save_to_settings_file(); - } - catch (std::exception&) - { - // Improper JSON. - } - } - - virtual bool on_hotkey(size_t hotkeyId) override - { - if (m_enabled) - { - Logger::trace(L"CropAndLock hotkey pressed"); - if (!is_process_running()) - { - Enable(); - } - - if (hotkeyId == 0) { // Same order as set by get_hotkeys - SetEvent(m_reparent_event_handle); - Trace::CropAndLock::ActivateReparent(); - } - if (hotkeyId == 1) { // Same order as set by get_hotkeys - SetEvent(m_thumbnail_event_handle); - Trace::CropAndLock::ActivateThumbnail(); - } - - return true; - } - - return false; - } - - virtual size_t get_hotkeys(Hotkey* hotkeys, size_t buffer_size) override - { - if (hotkeys && buffer_size >= 2) - { - hotkeys[0] = m_reparent_hotkey; - hotkeys[1] = m_thumbnail_hotkey; - } - return 2; - } - - // Enable the powertoy - virtual void enable() - { - Logger::info("CropAndLock enabling"); - Enable(); - } - - // Disable the powertoy - virtual void disable() - { - Logger::info("CropAndLock disabling"); - Disable(true); - } - - // Returns if the powertoy is enabled - virtual bool is_enabled() override - { - return m_enabled; - } - - // Destroy the powertoy and free memory - virtual void destroy() override - { - Disable(false); - delete this; - } - - virtual void send_settings_telemetry() override - { - Logger::info("Send settings telemetry"); - Trace::CropAndLock::SettingsTelemetry(m_reparent_hotkey, m_thumbnail_hotkey); - } - - CropAndLockModuleInterface() - { - app_name = L"CropAndLock"; - app_key = NonLocalizable::ModuleKey; - LoggerHelpers::init_logger(app_key, L"ModuleInterface", LogSettings::cropAndLockLoggerName); - - m_reparent_event_handle = CreateDefaultEvent(CommonSharedConstants::CROP_AND_LOCK_REPARENT_EVENT); - m_thumbnail_event_handle = CreateDefaultEvent(CommonSharedConstants::CROP_AND_LOCK_THUMBNAIL_EVENT); - m_exit_event_handle = CreateDefaultEvent(CommonSharedConstants::CROP_AND_LOCK_EXIT_EVENT); - - init_settings(); - } - -private: - void Enable() - { - m_enabled = true; - - // Log telemetry - Trace::CropAndLock::Enable(true); - - // Pass the PID. - unsigned long powertoys_pid = GetCurrentProcessId(); - std::wstring executable_args = L""; - executable_args.append(std::to_wstring(powertoys_pid)); - - ResetEvent(m_reparent_event_handle); - ResetEvent(m_thumbnail_event_handle); - ResetEvent(m_exit_event_handle); - - SHELLEXECUTEINFOW sei{ sizeof(sei) }; - sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI }; - sei.lpFile = NonLocalizable::ModulePath; - sei.nShow = SW_SHOWNORMAL; - sei.lpParameters = executable_args.data(); - if (ShellExecuteExW(&sei) == false) - { - Logger::error(L"Failed to start CropAndLock"); - auto message = get_last_error_message(GetLastError()); - if (message.has_value()) - { - Logger::error(message.value()); - } - } - else - { - m_hProcess = sei.hProcess; - } - - } - - void Disable(bool const traceEvent) - { - m_enabled = false; - - // We can't just kill the process, since Crop and Lock might need to release any reparented windows first. - SetEvent(m_exit_event_handle); - - ResetEvent(m_reparent_event_handle); - ResetEvent(m_thumbnail_event_handle); - - // Log telemetry - if (traceEvent) - { - Trace::CropAndLock::Enable(false); - } - - if (m_hProcess) - { - m_hProcess = nullptr; - } - - } - - void parse_hotkey(PowerToysSettings::PowerToyValues& settings) - { - auto settingsObject = settings.get_raw_json(); - if (settingsObject.GetView().Size()) - { - try - { - Hotkey _temp_reparent; - auto jsonHotkeyObject = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(JSON_KEY_REPARENT_HOTKEY).GetNamedObject(JSON_KEY_VALUE); - _temp_reparent.win = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_WIN); - _temp_reparent.alt = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_ALT); - _temp_reparent.shift = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_SHIFT); - _temp_reparent.ctrl = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_CTRL); - _temp_reparent.key = static_cast(jsonHotkeyObject.GetNamedNumber(JSON_KEY_CODE)); - m_reparent_hotkey = _temp_reparent; - } - catch (...) - { - Logger::error("Failed to initialize CropAndLock reparent shortcut from settings. Value will keep unchanged."); - } - try - { - Hotkey _temp_thumbnail; - auto jsonHotkeyObject = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(JSON_KEY_THUMBNAIL_HOTKEY).GetNamedObject(JSON_KEY_VALUE); - _temp_thumbnail.win = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_WIN); - _temp_thumbnail.alt = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_ALT); - _temp_thumbnail.shift = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_SHIFT); - _temp_thumbnail.ctrl = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_CTRL); - _temp_thumbnail.key = static_cast(jsonHotkeyObject.GetNamedNumber(JSON_KEY_CODE)); - m_thumbnail_hotkey = _temp_thumbnail; - } - catch (...) - { - Logger::error("Failed to initialize CropAndLock thumbnail shortcut from settings. Value will keep unchanged."); - } - } - else - { - Logger::info("CropAndLock settings are empty"); - } - } - - bool is_process_running() - { - return WaitForSingleObject(m_hProcess, 0) == WAIT_TIMEOUT; - } - - void init_settings() - { - try - { - // Load and parse the settings file for this PowerToy. - PowerToysSettings::PowerToyValues settings = - PowerToysSettings::PowerToyValues::load_from_settings_file(get_key()); - - parse_hotkey(settings); - } - catch (std::exception&) - { - Logger::warn(L"An exception occurred while loading the settings file"); - // Error while loading from the settings file. Let default values stay as they are. - } - } - - std::wstring app_name; - std::wstring app_key; //contains the non localized key of the powertoy - - bool m_enabled = false; - HANDLE m_hProcess = nullptr; - - // TODO: actual default hotkey setting in line with other PowerToys. - Hotkey m_reparent_hotkey = { .win = true, .ctrl = true, .shift = true, .alt = false, .key = 'R' }; - Hotkey m_thumbnail_hotkey = { .win = true, .ctrl = true, .shift = true, .alt = false, .key = 'T' }; - - HANDLE m_reparent_event_handle; - HANDLE m_thumbnail_event_handle; - HANDLE m_exit_event_handle; - -}; - -extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create() -{ - return new CropAndLockModuleInterface(); -} diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/packages.config b/src/modules/CropAndLock/CropAndLockModuleInterface/packages.config deleted file mode 100644 index ff4b059648..0000000000 --- a/src/modules/CropAndLock/CropAndLockModuleInterface/packages.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/pch.cpp b/src/modules/CropAndLock/CropAndLockModuleInterface/pch.cpp deleted file mode 100644 index 64b7eef6d6..0000000000 --- a/src/modules/CropAndLock/CropAndLockModuleInterface/pch.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// pch.cpp: source file corresponding to the pre-compiled header - -#include "pch.h" - -// When you are using pre-compiled headers, this source file is necessary for compilation to succeed. diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/pch.h b/src/modules/CropAndLock/CropAndLockModuleInterface/pch.h deleted file mode 100644 index 3914e22561..0000000000 --- a/src/modules/CropAndLock/CropAndLockModuleInterface/pch.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#include -#include -#include -#include -#include -#include -#include diff --git a/src/modules/CropAndLock/CropAndLockModuleInterface/resource.h b/src/modules/CropAndLock/CropAndLockModuleInterface/resource.h deleted file mode 100644 index c2d7221f0e..0000000000 --- a/src/modules/CropAndLock/CropAndLockModuleInterface/resource.h +++ /dev/null @@ -1,13 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by CropAndLockModuleInterface.rc - -////////////////////////////// -// Non-localizable - -#define FILE_DESCRIPTION "PowerToys CropAndLockModuleInterface" -#define INTERNAL_NAME "PowerToys.CropAndLockModuleInterface" -#define ORIGINAL_FILENAME "PowerToys.CropAndLockModuleInterface.dll" - -// Non-localizable -//////////////////////////////