Skip to content

Instantly share code, notes, and snippets.

@m417z
Created August 17, 2024 09:36
Show Gist options
  • Save m417z/1cb0ffd3c9bbb5f5333ac3413b27b71a to your computer and use it in GitHub Desktop.
Save m417z/1cb0ffd3c9bbb5f5333ac3413b27b71a to your computer and use it in GitHub Desktop.
// ==WindhawkMod==
// @id disable-topmost-2-hang-fix
// @name Win10 taskbar disable_topmost=2 hang fix
// @description An attempt at fixing a taskbar hang when using disable_topmost=2
// @version 0.1
// @author m417z
// @github https://github.com/m417z
// @twitter https://twitter.com/m417z
// @homepage https://m417z.com/
// @include explorer.exe
// @architecture x86-64
// ==/WindhawkMod==
// ==WindhawkModReadme==
/*
# Win10 taskbar disable_topmost=2 hang fix
An attempt at fixing a taskbar hang when using disable_topmost=2.
Details:
[https://ramensoftware.com/7-taskbar-tweaker/comment-page-55#comment-15296](https://ramensoftware.com/7-taskbar-tweaker/comment-page-55#comment-15296)
*/
// ==/WindhawkModReadme==
#include <windhawk_utils.h>
using ShellFeedsUtil_NotifyNewLockscreenContent_t =
HRESULT(WINAPI*)(void* pThis, void* param1);
ShellFeedsUtil_NotifyNewLockscreenContent_t
ShellFeedsUtil_NotifyNewLockscreenContent_Original;
HRESULT WINAPI ShellFeedsUtil_NotifyNewLockscreenContent_Hook(void* pThis,
void* param1) {
Wh_Log(L">");
return 0;
}
BOOL Wh_ModInit() {
Wh_Log(L">");
WindhawkUtils::SYMBOL_HOOK explorerExeHooks[] = {
{
{LR"(long __cdecl ShellFeedsUtil::NotifyNewLockscreenContent(unsigned short const *))"},
&ShellFeedsUtil_NotifyNewLockscreenContent_Original,
ShellFeedsUtil_NotifyNewLockscreenContent_Hook,
},
};
return HookSymbols(GetModuleHandle(nullptr), explorerExeHooks,
ARRAYSIZE(explorerExeHooks));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment