diff --git a/PowerToys.slnx b/PowerToys.slnx
index e8dea05b96..cebe3fa3a5 100644
--- a/PowerToys.slnx
+++ b/PowerToys.slnx
@@ -866,7 +866,6 @@
-
diff --git a/src/RunnerV2/RunnerV2/Models/IPowerToysModule.cs b/src/RunnerV2/RunnerV2/Models/IPowerToysModule.cs
index f0305d2548..c7cd6e4e40 100644
--- a/src/RunnerV2/RunnerV2/Models/IPowerToysModule.cs
+++ b/src/RunnerV2/RunnerV2/Models/IPowerToysModule.cs
@@ -67,7 +67,7 @@ namespace RunnerV2.Models
///
/// Value of or "general" indicating the type of change.
/// The json element with the new settings.
- public virtual void OnSettingsChanged(string settingsKind, JsonElement jsonProperties)
+ public void OnSettingsChanged(string settingsKind, JsonElement jsonProperties)
{
}
}
diff --git a/src/RunnerV2/RunnerV2/ModuleInterfaces/FileExplorerModuleInterface.cs b/src/RunnerV2/RunnerV2/ModuleInterfaces/FileExplorerModuleInterface.cs
index c856fecb39..eda0c41db9 100644
--- a/src/RunnerV2/RunnerV2/ModuleInterfaces/FileExplorerModuleInterface.cs
+++ b/src/RunnerV2/RunnerV2/ModuleInterfaces/FileExplorerModuleInterface.cs
@@ -7,9 +7,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
-using System.Text;
using System.Text.Json;
-using System.Threading.Tasks;
using ManagedCommon;
using Microsoft.PowerToys.Settings.UI.Library;
using PowerToys.GPOWrapper;
diff --git a/src/RunnerV2/RunnerV2/ModuleInterfaces/PowerOCRModuleInterface.cs b/src/RunnerV2/RunnerV2/ModuleInterfaces/PowerOCRModuleInterface.cs
new file mode 100644
index 0000000000..ff3155d555
--- /dev/null
+++ b/src/RunnerV2/RunnerV2/ModuleInterfaces/PowerOCRModuleInterface.cs
@@ -0,0 +1,59 @@
+// 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.Text.Json;
+using System.Threading;
+using Microsoft.PowerToys.Settings.UI.Library;
+using PowerToys.GPOWrapper;
+using PowerToys.Interop;
+using RunnerV2.Models;
+
+namespace RunnerV2.ModuleInterfaces
+{
+ internal sealed class PowerOCRModuleInterface : ProcessModuleAbstractClass, IPowerToysModule
+ {
+ public string Name => "TextExtractor";
+
+ public bool Enabled => SettingsUtils.Default.GetSettings().Enabled.PowerOcr;
+
+ public GpoRuleConfigured GpoRuleConfigured => GPOWrapper.GetConfiguredTextExtractorEnabledValue();
+
+ public override string ProcessPath => "PowerToys.PowerOCR.exe";
+
+ public override string ProcessName => "PowerToys.PowerOCR";
+
+ public override ProcessLaunchOptions LaunchOptions => ProcessLaunchOptions.SingletonProcess | ProcessLaunchOptions.RunnerProcessIdAsFirstArgument;
+
+ public List<(HotkeySettings Hotkey, Action Action)> Shortcuts { get; } = [];
+
+ private void PopulateShortcuts()
+ {
+ Shortcuts.Clear();
+ Shortcuts.Add((SettingsUtils.Default.GetSettings(Name).Properties.DefaultActivationShortcut, () =>
+ {
+ using var invokeOcrEvent = new EventWaitHandle(false, EventResetMode.AutoReset, Constants.ShowPowerOCRSharedEvent());
+ invokeOcrEvent.Set();
+ }
+ ));
+ }
+
+ public void Disable()
+ {
+ using var terminateEvent = new EventWaitHandle(false, EventResetMode.AutoReset, Constants.TerminatePowerOCRSharedEvent());
+ terminateEvent.Set();
+ }
+
+ public void Enable()
+ {
+ PopulateShortcuts();
+ }
+
+ public void OnSettingsChanged(string settingsKind, JsonElement jsonProperties)
+ {
+ PopulateShortcuts();
+ }
+ }
+}
diff --git a/src/RunnerV2/RunnerV2/Runner.cs b/src/RunnerV2/RunnerV2/Runner.cs
index c30d39f00a..52b78a9ca2 100644
--- a/src/RunnerV2/RunnerV2/Runner.cs
+++ b/src/RunnerV2/RunnerV2/Runner.cs
@@ -54,6 +54,7 @@ namespace RunnerV2
new RegistryPreviewModuleInterface(),
new FileExplorerModuleInterface(),
new ZoomItModuleInterface(),
+ new PowerOCRModuleInterface(),
];
///
@@ -182,6 +183,7 @@ namespace RunnerV2
}
catch (IOException)
{
+ return;
}
catch (Exception e)
{
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCR.base.rc b/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCR.base.rc
deleted file mode 100644
index b30e3923c9..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCR.base.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/PowerOCR/PowerOCRModuleInterface/PowerOCRModuleInterface.vcxproj b/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCRModuleInterface.vcxproj
deleted file mode 100644
index 53b1dd8336..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCRModuleInterface.vcxproj
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-
-
- 15.0
- Win32Proj
- {6AB6A2D6-F859-4A82-9184-0BD29C9F07D1}
- PowerOCR
- PowerOCRModuleInterface
- PowerToys.PowerOCRModuleInterface
-
-
-
- DynamicLibrary
- v143
-
-
-
-
-
-
-
-
-
-
-
- ..\..\..\..\$(Platform)\$(Configuration)\
-
-
-
- EXAMPLEPOWERTOY_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)
- ..\..\..\common\inc;..\..\..\common\Telemetry;..\..\;..\..\..\;%(AdditionalIncludeDirectories)
-
-
- $(OutDir)$(TargetName)$(TargetExt)
-
-
-
-
-
-
-
-
-
-
-
-
-
- Create
-
-
-
-
-
- {d9b8fc84-322a-4f9f-bbb9-20915c47ddfd}
-
-
- {6955446d-23f7-4023-9bb3-8657f904af99}
-
-
-
-
-
-
-
-
- Designer
-
-
-
-
-
-
-
-
-
- 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/PowerOCR/PowerOCRModuleInterface/PowerOCRModuleInterface.vcxproj.filters b/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCRModuleInterface.vcxproj.filters
deleted file mode 100644
index e790fb8e0e..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOCRModuleInterface.vcxproj.filters
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
- {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
- cpp;c;cc;cxx;c++;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
-
-
- {875a08c6-f610-4667-bd0f-80171ed96072}
-
-
-
-
- Header Files
-
-
- Generated Files
-
-
- Header Files
-
-
- Header Files
-
-
-
-
- Source Files
-
-
- Source Files
-
-
- Source Files
-
-
-
-
- Header Files
-
-
- Resource Files
-
-
- Resource Files
-
-
-
-
-
- Resource Files
-
-
-
\ No newline at end of file
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOcrConstants.h b/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOcrConstants.h
deleted file mode 100644
index 04df616d57..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/PowerOcrConstants.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#pragma once
-#include
-
-namespace PowerOcrConstants
-{
- // Name of the powertoy module.
- inline const std::wstring ModuleKey = L"TextExtractor";
-}
\ No newline at end of file
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/Resources.resx b/src/modules/PowerOCR/PowerOCRModuleInterface/Resources.resx
deleted file mode 100644
index 8771103f56..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/Resources.resx
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- Text Extractor
-
-
- This feature requires Windows 10 version 1903 or higher
-
-
\ No newline at end of file
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/dllmain.cpp b/src/modules/PowerOCR/PowerOCRModuleInterface/dllmain.cpp
deleted file mode 100644
index b9695d6d35..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/dllmain.cpp
+++ /dev/null
@@ -1,314 +0,0 @@
-// dllmain.cpp : Defines the entry point for the DLL application.
-#include "pch.h"
-
-#include
-#include "trace.h"
-#include "Generated Files/resource.h"
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-BOOL APIENTRY DllMain(HMODULE /*hModule*/,
- DWORD ul_reason_for_call,
- LPVOID /*lpReserved*/)
-{
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- Trace::RegisterProvider();
- break;
- case DLL_THREAD_ATTACH:
- break;
- case DLL_THREAD_DETACH:
- break;
- case DLL_PROCESS_DETACH:
- Trace::UnregisterProvider();
- break;
- }
-
- return TRUE;
-}
-
-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_ACTIVATION_SHORTCUT[] = L"ActivationShortcut";
-}
-
-struct ModuleSettings
-{
-} g_settings;
-
-class PowerOCR : public PowertoyModuleIface
-{
-private:
- bool m_enabled = false;
-
- std::wstring app_name;
-
- //contains the non localized key of the powertoy
- std::wstring app_key;
-
- HANDLE m_hProcess;
-
- // Time to wait for process to close after sending WM_CLOSE signal
- static const int MAX_WAIT_MILLISEC = 10000;
-
- Hotkey m_hotkey;
-
- // Handle to event used to invoke PowerOCR
- HANDLE m_hInvokeEvent;
- // Handle to event used to terminate PowerOCR
- HANDLE m_hTerminateEvent;
-
- void parse_hotkey(PowerToysSettings::PowerToyValues& settings)
- {
- auto settingsObject = settings.get_raw_json();
- if (settingsObject.GetView().Size())
- {
- try
- {
- auto jsonHotkeyObject = settingsObject.GetNamedObject(JSON_KEY_PROPERTIES).GetNamedObject(JSON_KEY_ACTIVATION_SHORTCUT);
- m_hotkey.win = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_WIN);
- m_hotkey.alt = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_ALT);
- m_hotkey.shift = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_SHIFT);
- m_hotkey.ctrl = jsonHotkeyObject.GetNamedBoolean(JSON_KEY_CTRL);
- m_hotkey.key = static_cast(jsonHotkeyObject.GetNamedNumber(JSON_KEY_CODE));
- }
- catch (...)
- {
- Logger::error("Failed to initialize TextExtractor start shortcut");
- }
- }
- else
- {
- Logger::info("TextExtractor settings are empty");
- }
-
- if (!m_hotkey.key)
- {
- Logger::info("TextExtractor is going to use default shortcut");
- m_hotkey.win = true;
- m_hotkey.alt = false;
- m_hotkey.shift = true;
- m_hotkey.ctrl = false;
- m_hotkey.key = 'T';
- }
- }
-
- bool is_process_running()
- {
- return WaitForSingleObject(m_hProcess, 0) == WAIT_TIMEOUT;
- }
-
- void launch_process()
- {
- Logger::trace(L"Starting TextExtractor process");
- unsigned long powertoys_pid = GetCurrentProcessId();
-
- std::wstring executable_args = L"";
- executable_args.append(std::to_wstring(powertoys_pid));
-
- SHELLEXECUTEINFOW sei{ sizeof(sei) };
- sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI };
- sei.lpFile = L"PowerToys.PowerOCR.exe";
- sei.nShow = SW_SHOWNORMAL;
- sei.lpParameters = executable_args.data();
- if (ShellExecuteExW(&sei))
- {
- Logger::trace("Successfully started the TextExtractor process");
- }
- else
- {
- Logger::error(L"TextExtractor failed to start. {}", get_last_error_or_default(GetLastError()));
- }
-
- m_hProcess = sei.hProcess;
- }
-
- // Load the settings file.
- 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.
- }
- }
-
-public:
- PowerOCR()
- {
- app_name = GET_RESOURCE_STRING(IDS_TEXTEXTRACTOR_NAME);
- app_key = PowerOcrConstants::ModuleKey;
- LoggerHelpers::init_logger(app_key, L"ModuleInterface", "TextExtractor");
- m_hInvokeEvent = CreateDefaultEvent(CommonSharedConstants::SHOW_POWEROCR_SHARED_EVENT);
- m_hTerminateEvent = CreateDefaultEvent(CommonSharedConstants::TERMINATE_POWEROCR_SHARED_EVENT);
- init_settings();
- }
-
- ~PowerOCR()
- {
- if (m_enabled)
- {
- }
- m_enabled = false;
- }
-
- // Destroy the powertoy and free memory
- virtual void destroy() override
- {
- Logger::trace("TextExtractor::destroy()");
- delete this;
- }
-
- // Return the localized display name of the powertoy
- virtual const wchar_t* 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::getConfiguredTextExtractorEnabledValue();
- }
-
- 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());
- settings.set_description(GET_RESOURCE_STRING(IDS_TEXTEXTRACTOR_SETTINGS_DESC));
-
- settings.set_overview_link(L"https://aka.ms/PowerToysOverview_TextExtractor");
-
- return settings.serialize_to_buffer(buffer, buffer_size);
- }
-
- virtual void call_custom_action(const wchar_t* /*action*/) override
- {
- }
-
- 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);
- // If you don't need to do any custom processing of the settings, proceed
- // to persists the values calling:
- values.save_to_settings_file();
- // Otherwise call a custom function to process the settings before saving them to disk:
- // save_settings();
- }
- catch (std::exception&)
- {
- // Improper JSON.
- }
- }
-
- virtual void enable()
- {
- Logger::trace("TextExtractor::enable()");
- ResetEvent(m_hInvokeEvent);
- launch_process();
- m_enabled = true;
- Trace::EnablePowerOCR(true);
- };
-
- virtual void disable()
- {
- Logger::trace("TextExtractor::disable()");
- if (m_enabled)
- {
- ResetEvent(m_hInvokeEvent);
- SetEvent(m_hTerminateEvent);
- WaitForSingleObject(m_hProcess, 1500);
- TerminateProcess(m_hProcess, 1);
- }
-
- m_enabled = false;
- Trace::EnablePowerOCR(false);
- }
-
- virtual bool on_hotkey(size_t /*hotkeyId*/) override
- {
- if (m_enabled)
- {
- Logger::trace(L"TextExtractor hotkey pressed");
- if (!is_process_running())
- {
- launch_process();
- }
-
- SetEvent(m_hInvokeEvent);
- return true;
- }
-
- return false;
- }
-
- virtual size_t get_hotkeys(Hotkey* hotkeys, size_t buffer_size) override
- {
- if (m_hotkey.key)
- {
- if (hotkeys && buffer_size >= 1)
- {
- hotkeys[0] = m_hotkey;
- }
-
- return 1;
- }
- else
- {
- return 0;
- }
- }
-
- virtual bool is_enabled() override
- {
- return m_enabled;
- }
-
- // Returns whether the PowerToys should be enabled by default
- virtual bool is_enabled_by_default() const override
- {
- // disabled by default for Windows 11 and enabled by default on Windows 10
- return !package::IsWin11OrGreater();
- }
-};
-
-extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()
-{
- return new PowerOCR();
-}
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/packages.config b/src/modules/PowerOCR/PowerOCRModuleInterface/packages.config
deleted file mode 100644
index 09bfc449e2..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/pch.cpp b/src/modules/PowerOCR/PowerOCRModuleInterface/pch.cpp
deleted file mode 100644
index ce9b73991b..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/pch.cpp
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "pch.h"
-
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/pch.h b/src/modules/PowerOCR/PowerOCRModuleInterface/pch.h
deleted file mode 100644
index 329705f63b..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/pch.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#define WIN32_LEAN_AND_MEAN
-#include
-#include
-#include
-#include
-#include
\ No newline at end of file
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/resource.base.h b/src/modules/PowerOCR/PowerOCRModuleInterface/resource.base.h
deleted file mode 100644
index 20984c734f..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/resource.base.h
+++ /dev/null
@@ -1,13 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by PowerOCR.rc
-
-//////////////////////////////
-// Non-localizable
-
-#define FILE_DESCRIPTION "PowerToys TextExtractor"
-#define INTERNAL_NAME "PowerToys.PowerOCR"
-#define ORIGINAL_FILENAME "PowerToys.PowerOCR.dll"
-
-// Non-localizable
-//////////////////////////////
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/trace.cpp b/src/modules/PowerOCR/PowerOCRModuleInterface/trace.cpp
deleted file mode 100644
index 979619b915..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/trace.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "pch.h"
-#include "trace.h"
-
-#include
-
-TRACELOGGING_DEFINE_PROVIDER(
- g_hProvider,
- "Microsoft.PowerToys",
- // {38e8889b-9731-53f5-e901-e8a7c1753074}
- (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74),
- TraceLoggingOptionProjectTelemetry());
-
-// Log if the user has PowerOCR enabled or disabled
-void Trace::EnablePowerOCR(const bool enabled) noexcept
-{
- TraceLoggingWriteWrapper(
- g_hProvider,
- "PowerOCR_EnablePowerOCR",
- ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance),
- TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE),
- TraceLoggingBoolean(enabled, "Enabled"));
-}
diff --git a/src/modules/PowerOCR/PowerOCRModuleInterface/trace.h b/src/modules/PowerOCR/PowerOCRModuleInterface/trace.h
deleted file mode 100644
index b8e428994e..0000000000
--- a/src/modules/PowerOCR/PowerOCRModuleInterface/trace.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#pragma once
-
-#include
-
-class Trace : public telemetry::TraceBase
-{
-public:
- // Log if the user has PowerOCR enabled or disabled
- static void EnablePowerOCR(const bool enabled) noexcept;
-};