-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Openshell's taskbar doesn't properly show on latest version of Windows 11 (ExplorerPatcher) #2094
Comments
This is because Win10 uses
|
Thanks for the reply. |
Hi, developer of the reimplemented taskbar here, sorry for just responding to this now. I've been packed with RE adventures on the very overengineered and architected 8.1 start screen. So yeah I know that this is a problem and I've dismissed two issues in EP's repo related to this. First I would admit that I looked at the XP code while doing the reimplementation. Because I know that function is private, exported by ordinal, and not in the public .lib files, I had to do dynamic linking or some other trick that would make it link statically to shlwapi.dll by ordinal. And then I looked at its code in the XP code, found out that the body is very simple (undoubtedly simpler than the excerpt below) so without knowing that Open-Shell or any other program makes use of it for their features, I decided to copy paste it into my codebase. Which works for unmodded, but won't be able to be made to work easily with your program. I have several things that I can do in mind:
// shlwapi.dll ordinal 279
typedef HRESULT (*SHInvokeDefaultCommand_t)(HWND hwnd, IShellFolder* psf, LPCITEMIDLIST pidl);
HRESULT SHInvokeDefaultCommand(HWND hwnd, IShellFolder* psf, LPCITEMIDLIST pidl)
{
static SHInvokeDefaultCommand_t fn = nullptr;
if (!fn)
{
HMODULE h = GetModuleHandleW(L"shlwapi.dll");
if (h)
fn = (SHInvokeDefaultCommand_t)GetProcAddress(h, MAKEINTRESOURCEA(279));
}
return fn ? fn(hwnd, psf, pidl) : E_FAIL;
}
I'm not really familiar with Open-Shell's codebase, so apologies if some things are not feasible. I'm planning for a new EP release next week, so I hope we can find an agreement soon. Thanks! |
|
@Amrsatrio
True that. Didn't realize it is not quite easy to statically import such undocumented function by ordinal.
This won't work because we don't do inline hooking (patch code). We do IAT (import address table) hooking instead, where we change address of resolved API in given module we are hooking ( So we can hook only directly imported API.
This would work for us, though not sure if that will be feasible for you. Here is some info about importing by ordinal: Then there is other option, to hook Anyways, thank you for your insights and your hard work on taskbar reimplementation. |
Build from #2107 PR should make taskbar texturing work with I will wait for @Amrsatrio regarding static import of |
Static importing SHFillRectClr would require me making a dummy "shlwapi.dll" project. But if the ExtTextOutW hook works for you I guess we can settle with it. Make sure you check STDAPI_(void) SHFillRectClr(HDC hdc, LPRECT prc, COLORREF clr)
{
COLORREF clrSave = SetBkColor(hdc, clr);
ExtTextOutW(hdc, 0, 0, ETO_OPAQUE, prc, nullptr, 0, nullptr);
SetBkColor(hdc, clrSave);
} |
Area of issue
Taskbar
To reproduce
Expected behavior
I expected just for it to work.
Open-Shell version
4_4_194
Windows version
Windows 11 24H2
Additional context
No response
The text was updated successfully, but these errors were encountered: