[FancyZones] Initial improvements in FancyZones exception handling (#6063)

* Initial improvements in FancyZones exception handling

* Add callback

* Disable FancyZones if error durign loading data occurrs

* Remove logs

* Add resource strings

* Add 1sec retry when failure during initialization occurs

* Rephrase error descriptions

* Error handling during loading of module in runner

* Pass error handling on the runner

* Remove unneeded string

* Remove unnedeed changes
This commit is contained in:
vldmr11080
2020-09-18 15:18:01 +02:00
committed by GitHub
parent 2bc3480396
commit 3aa7a52c21
9 changed files with 153 additions and 86 deletions

View File

@@ -71,7 +71,7 @@ public:
{
InitializeWinhookEventIds();
Trace::FancyZones::EnableFancyZones(true);
m_app = MakeFancyZones(reinterpret_cast<HINSTANCE>(&__ImageBase), m_settings);
m_app = MakeFancyZones(reinterpret_cast<HINSTANCE>(&__ImageBase), m_settings, std::bind(&FancyZonesModule::disable, this));
#if defined(DISABLE_LOWLEVEL_HOOKS_WHEN_DEBUGGED)
const bool hook_disabled = IsDebuggerPresent();
#else
@@ -129,7 +129,7 @@ public:
// Returns if the powertoy is enabled
virtual bool is_enabled() override
{
return (m_app != nullptr);
return m_app != nullptr;
}
// Destroy the powertoy and free memory