mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-11-23 23:21:08 +01:00
Taskbar10: Don't crash if stobject.dll is not present
This commit is contained in:
parent
5451e1e28a
commit
6add2999ab
@ -9969,6 +9969,9 @@ typedef struct SSOEntry
|
|||||||
|
|
||||||
void PatchStobject(HANDLE hStobject)
|
void PatchStobject(HANDLE hStobject)
|
||||||
{
|
{
|
||||||
|
if (!hStobject)
|
||||||
|
return;
|
||||||
|
|
||||||
PBYTE beginRData = NULL;
|
PBYTE beginRData = NULL;
|
||||||
DWORD sizeRData = 0;
|
DWORD sizeRData = 0;
|
||||||
|
|
||||||
@ -10689,21 +10692,24 @@ DWORD Inject(BOOL bIsExplorer)
|
|||||||
|
|
||||||
|
|
||||||
HANDLE hStobject = LoadLibraryW(L"stobject.dll");
|
HANDLE hStobject = LoadLibraryW(L"stobject.dll");
|
||||||
VnPatchIAT(hStobject, "api-ms-win-core-registry-l1-1-0.dll", "RegGetValueW", stobject_RegGetValueW);
|
if (hStobject)
|
||||||
VnPatchIAT(hStobject, "api-ms-win-core-com-l1-1-0.dll", "CoCreateInstance", stobject_CoCreateInstanceHook);
|
|
||||||
if (IsWindows11())
|
|
||||||
{
|
{
|
||||||
VnPatchDelayIAT(hStobject, "user32.dll", "TrackPopupMenu", stobject_TrackPopupMenuHook);
|
VnPatchIAT(hStobject, "api-ms-win-core-registry-l1-1-0.dll", "RegGetValueW", stobject_RegGetValueW);
|
||||||
VnPatchDelayIAT(hStobject, "user32.dll", "TrackPopupMenuEx", stobject_TrackPopupMenuExHook);
|
VnPatchIAT(hStobject, "api-ms-win-core-com-l1-1-0.dll", "CoCreateInstance", stobject_CoCreateInstanceHook);
|
||||||
}
|
if (IsWindows11())
|
||||||
else
|
{
|
||||||
{
|
VnPatchDelayIAT(hStobject, "user32.dll", "TrackPopupMenu", stobject_TrackPopupMenuHook);
|
||||||
VnPatchIAT(hStobject, "user32.dll", "TrackPopupMenu", stobject_TrackPopupMenuHook);
|
VnPatchDelayIAT(hStobject, "user32.dll", "TrackPopupMenuEx", stobject_TrackPopupMenuExHook);
|
||||||
VnPatchIAT(hStobject, "user32.dll", "TrackPopupMenuEx", stobject_TrackPopupMenuExHook);
|
}
|
||||||
}
|
else
|
||||||
if (global_rovi.dwBuildNumber >= 25236 && bOldTaskbar)
|
{
|
||||||
{
|
VnPatchIAT(hStobject, "user32.dll", "TrackPopupMenu", stobject_TrackPopupMenuHook);
|
||||||
PatchStobject(hStobject);
|
VnPatchIAT(hStobject, "user32.dll", "TrackPopupMenuEx", stobject_TrackPopupMenuExHook);
|
||||||
|
}
|
||||||
|
if (global_rovi.dwBuildNumber >= 25236 && bOldTaskbar)
|
||||||
|
{
|
||||||
|
PatchStobject(hStobject);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#ifdef USE_PRIVATE_INTERFACES
|
#ifdef USE_PRIVATE_INTERFACES
|
||||||
if (bSkinIcons)
|
if (bSkinIcons)
|
||||||
|
Loading…
Reference in New Issue
Block a user