mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2025-02-25 22:38:10 +01:00
Taskbar10: Various *important* fixes:
- Revised the method for enabling the old taskbar by intercepting the code path for initializing the new taskbar, due to a very rare issue where our hook does not get called on certain recent builds. (#2499) - Fixed crash on 25921+ due to the removal of pnidui.dll. (#2558) - Fixed potential stability issues when using the new taskbar on 22621.2787+.
This commit is contained in:
parent
a7a3d2727c
commit
ec68783677
@ -281,6 +281,10 @@
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="Taskbar10.c">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="TaskbarCenter.c">
|
<ClCompile Include="TaskbarCenter.c">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
</ExcludedFromBuild>
|
</ExcludedFromBuild>
|
||||||
|
45
ExplorerPatcher/Taskbar10.c
Normal file
45
ExplorerPatcher/Taskbar10.c
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#include "utility.h"
|
||||||
|
|
||||||
|
#pragma region "Enable old taskbar"
|
||||||
|
/***
|
||||||
|
Our target is in `CTray::Init()`. It constructs either the Windows 11 or the Windows 10 taskbar based on the result of
|
||||||
|
`winrt::WindowsUdk::ApplicationModel::AppExtensions::XamlExtensions::IsExtensionAvailable()`. We can to make the last
|
||||||
|
argument of that function be set to false, so that we'll get the Windows 10 taskbar instead of the Windows 11 one that
|
||||||
|
gets constructed through `CTray::InitializeTrayUIComponent()`.
|
||||||
|
|
||||||
|
Alternatively, we can modify the behavior of `CTray::InitializeTrayUIComponent`. It contains the code to call
|
||||||
|
`TrayUI_CreateInstance()` that resides in `Taskbar.dll` (checked through HKLM\SOFTWARE\Classes\CLSID\<the CLSID>) which
|
||||||
|
is a copy of the Windows 10 taskbar code but modified over the time to support the Windows 11 taskbar. We see that it
|
||||||
|
calls `CoCreateInstance` to get an `ITrayUIComponent` interface to an instance of `TrayUIComponent`. We hook that
|
||||||
|
function to make it return our own custom `ITrayUIComponent` instance. Our `ITrayUIComponent::InitializeWithTray()`
|
||||||
|
function calls `TrayUI_CreateInstance()` of `explorer.exe` that is also called when the last argument of
|
||||||
|
`IsExtensionAvailable()` after the call is false.
|
||||||
|
|
||||||
|
This way, we can get the Windows 10 taskbar which resides in explorer.exe without hooking LoadLibraryExW() in order to
|
||||||
|
perform our initial method which has been known to be inconsistent on some systems. (Thanks feature flags!)
|
||||||
|
***/
|
||||||
|
|
||||||
|
static ULONG STDMETHODCALLTYPE nimplAddRefRelease(IUnknown* This)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT STDMETHODCALLTYPE ITrayUIComponent_QueryInterface(ITrayUIComponent* This, REFIID riid, void** ppvObject)
|
||||||
|
{
|
||||||
|
// Should never be called
|
||||||
|
return E_NOTIMPL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static HRESULT STDMETHODCALLTYPE ITrayUIComponent_InitializeWithTray(ITrayUIComponent* This, ITrayUIHost* host, ITrayUI** result)
|
||||||
|
{
|
||||||
|
return explorer_TrayUI_CreateInstanceFunc(host, &IID_ITrayUI, (void**)result);
|
||||||
|
}
|
||||||
|
|
||||||
|
static const ITrayUIComponentVtbl instanceof_ITrayUIComponentVtbl = {
|
||||||
|
.QueryInterface = ITrayUIComponent_QueryInterface,
|
||||||
|
.AddRef = nimplAddRefRelease,
|
||||||
|
.Release = nimplAddRefRelease,
|
||||||
|
.InitializeWithTray = ITrayUIComponent_InitializeWithTray
|
||||||
|
};
|
||||||
|
const ITrayUIComponent instanceof_ITrayUIComponent = { &instanceof_ITrayUIComponentVtbl };
|
||||||
|
#pragma endregion
|
@ -2488,7 +2488,7 @@ LRESULT CALLBACK Shell_TrayWndMouseProc(
|
|||||||
return CallNextHookEx(Shell_TrayWndMouseHook, nCode, wParam, lParam);
|
return CallNextHookEx(Shell_TrayWndMouseHook, nCode, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ITrayUIHost* g_pTrayUIHost;
|
ITrayUIHost* g_pTrayUIHost;
|
||||||
|
|
||||||
INT64 Shell_TrayWndSubclassProc(
|
INT64 Shell_TrayWndSubclassProc(
|
||||||
_In_ HWND hWnd,
|
_In_ HWND hWnd,
|
||||||
@ -2574,8 +2574,8 @@ INT64 Shell_TrayWndSubclassProc(
|
|||||||
if (g_pTrayUIHost)
|
if (g_pTrayUIHost)
|
||||||
{
|
{
|
||||||
void** pTrayUIHostVtbl = *(void***)g_pTrayUIHost;
|
void** pTrayUIHostVtbl = *(void***)g_pTrayUIHost;
|
||||||
BOOL(*ShouldDeleteContextMenuUndo)(struct ITrayUIHost*) = pTrayUIHostVtbl[13];
|
BOOL(*ShouldDeleteContextMenuUndo)(ITrayUIHost*) = pTrayUIHostVtbl[13];
|
||||||
UINT(*GetContextMenuUndoResourceId)(struct ITrayUIHost*) = pTrayUIHostVtbl[14];
|
UINT(*GetContextMenuUndoResourceId)(ITrayUIHost*) = pTrayUIHostVtbl[14];
|
||||||
|
|
||||||
if (ShouldDeleteContextMenuUndo(g_pTrayUIHost))
|
if (ShouldDeleteContextMenuUndo(g_pTrayUIHost))
|
||||||
{
|
{
|
||||||
@ -4433,39 +4433,6 @@ INT64 winrt_Windows_Internal_Shell_implementation_MeetAndChatManager_OnMessageHo
|
|||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
#pragma region "Enable old taskbar"
|
|
||||||
#ifdef _WIN64
|
|
||||||
HRESULT(*explorer_RoGetActivationFactoryFunc)(HSTRING activatableClassId, GUID* iid, void** factory);
|
|
||||||
HRESULT explorer_RoGetActivationFactoryHook(HSTRING activatableClassId, GUID* iid, void** factory)
|
|
||||||
{
|
|
||||||
PCWSTR StringRawBuffer = WindowsGetStringRawBuffer(activatableClassId, 0);
|
|
||||||
if (!wcscmp(StringRawBuffer, L"WindowsUdk.ApplicationModel.AppExtensions.XamlExtensions"))
|
|
||||||
{
|
|
||||||
if (IsEqualGUID(iid, &IID_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics))
|
|
||||||
{
|
|
||||||
*factory = &instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
if (IsEqualGUID(iid, &IID_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2))
|
|
||||||
{
|
|
||||||
*factory = &instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return explorer_RoGetActivationFactoryFunc(activatableClassId, iid, factory);
|
|
||||||
}
|
|
||||||
|
|
||||||
FARPROC explorer_GetProcAddressHook(HMODULE hModule, const CHAR* lpProcName)
|
|
||||||
{
|
|
||||||
if ((*((WORD*)&(lpProcName)+1)) && !strncmp(lpProcName, "RoGetActivationFactory", 22))
|
|
||||||
return (FARPROC)explorer_RoGetActivationFactoryHook;
|
|
||||||
else
|
|
||||||
return GetProcAddress(hModule, lpProcName);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#pragma endregion
|
|
||||||
|
|
||||||
|
|
||||||
#pragma region "Open power user menu on Win+X"
|
#pragma region "Open power user menu on Win+X"
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
LRESULT explorer_SendMessageW(HWND hWndx, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
LRESULT explorer_SendMessageW(HWND hWndx, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
@ -8689,7 +8656,7 @@ DEFINE_GUID(CLSID_UIRibbonFramework,
|
|||||||
0xC3, 0x3E, 0x65, 0xF2, 0xB9, 0x57
|
0xC3, 0x3E, 0x65, 0xF2, 0xB9, 0x57
|
||||||
);
|
);
|
||||||
|
|
||||||
DEFINE_GUID(IID_UIRibbonFramework,
|
DEFINE_GUID(IID_IUIRibbonFramework,
|
||||||
0xF4F0385D,
|
0xF4F0385D,
|
||||||
0x6872, 0x43A8, 0xAD, 0x09,
|
0x6872, 0x43A8, 0xAD, 0x09,
|
||||||
0x4C, 0x33, 0x9C, 0xB3, 0xF5, 0xC5
|
0x4C, 0x33, 0x9C, 0xB3, 0xF5, 0xC5
|
||||||
@ -8697,20 +8664,22 @@ DEFINE_GUID(IID_UIRibbonFramework,
|
|||||||
|
|
||||||
HRESULT ExplorerFrame_CoCreateInstanceHook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID* ppv)
|
HRESULT ExplorerFrame_CoCreateInstanceHook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID* ppv)
|
||||||
{
|
{
|
||||||
if (dwFileExplorerCommandUI != 0 && dwFileExplorerCommandUI != 3 && dwFileExplorerCommandUI != 4 && IsEqualCLSID(rclsid, &CLSID_XamlIslandViewAdapter))
|
if (IsEqualCLSID(rclsid, &CLSID_XamlIslandViewAdapter))
|
||||||
{
|
{
|
||||||
return REGDB_E_CLASSNOTREG;
|
if (dwFileExplorerCommandUI != 0 && dwFileExplorerCommandUI != 3 && dwFileExplorerCommandUI != 4)
|
||||||
|
return REGDB_E_CLASSNOTREG;
|
||||||
}
|
}
|
||||||
if (dwFileExplorerCommandUI == 2 && IsEqualCLSID(rclsid, &CLSID_UIRibbonFramework) && IsEqualIID(riid, &IID_UIRibbonFramework))
|
else if (IsEqualCLSID(rclsid, &CLSID_UIRibbonFramework) && IsEqualIID(riid, &IID_IUIRibbonFramework))
|
||||||
{
|
{
|
||||||
return REGDB_E_CLASSNOTREG;
|
if (dwFileExplorerCommandUI == 2)
|
||||||
|
return REGDB_E_CLASSNOTREG;
|
||||||
}
|
}
|
||||||
return CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv);
|
return CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv);
|
||||||
}
|
}
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
|
|
||||||
#pragma region "Change language UI style"
|
#pragma region "Change language UI style + Enable old taskbar"
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
DEFINE_GUID(CLSID_InputSwitchControl,
|
DEFINE_GUID(CLSID_InputSwitchControl,
|
||||||
0xB9BC2A50,
|
0xB9BC2A50,
|
||||||
@ -8718,7 +8687,7 @@ DEFINE_GUID(CLSID_InputSwitchControl,
|
|||||||
0x5D, 0xB1, 0x4e, 0x18, 0x4b, 0xae
|
0x5D, 0xB1, 0x4e, 0x18, 0x4b, 0xae
|
||||||
);
|
);
|
||||||
|
|
||||||
DEFINE_GUID(IID_InputSwitchControl,
|
DEFINE_GUID(IID_IInputSwitchControl,
|
||||||
0xB9BC2A50,
|
0xB9BC2A50,
|
||||||
0x43C3, 0x41AA, 0xa0, 0x82,
|
0x43C3, 0x41AA, 0xa0, 0x82,
|
||||||
0x5D, 0xB1, 0x4e, 0x18, 0x4b, 0xae
|
0x5D, 0xB1, 0x4e, 0x18, 0x4b, 0xae
|
||||||
@ -8857,6 +8826,12 @@ HRESULT CInputSwitchControl_ShowInputSwitchHook(IInputSwitchControl* _this, RECT
|
|||||||
return CInputSwitchControl_ShowInputSwitchFunc(_this, lpRect);
|
return CInputSwitchControl_ShowInputSwitchFunc(_this, lpRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEFINE_GUID(CLSID_TrayUIComponent,
|
||||||
|
0x88FC85D3,
|
||||||
|
0x7090, 0x4F53, 0x8F, 0x7A,
|
||||||
|
0xEB, 0x02, 0x68, 0x16, 0x27, 0x88
|
||||||
|
);
|
||||||
|
|
||||||
HRESULT explorer_CoCreateInstanceHook(
|
HRESULT explorer_CoCreateInstanceHook(
|
||||||
REFCLSID rclsid,
|
REFCLSID rclsid,
|
||||||
LPUNKNOWN pUnkOuter,
|
LPUNKNOWN pUnkOuter,
|
||||||
@ -8865,10 +8840,10 @@ HRESULT explorer_CoCreateInstanceHook(
|
|||||||
IUnknown** ppv
|
IUnknown** ppv
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (IsEqualCLSID(rclsid, &CLSID_InputSwitchControl) && IsEqualIID(riid, &IID_InputSwitchControl))
|
if (IsEqualCLSID(rclsid, &CLSID_InputSwitchControl) && IsEqualIID(riid, &IID_IInputSwitchControl))
|
||||||
{
|
{
|
||||||
HRESULT hr = CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv);
|
HRESULT hr = CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr) && bOldTaskbar && dwIMEStyle)
|
||||||
{
|
{
|
||||||
// The commented method below is no longer required as I have now came to patching
|
// The commented method below is no longer required as I have now came to patching
|
||||||
// the interface's vtable.
|
// the interface's vtable.
|
||||||
@ -8939,6 +8914,14 @@ HRESULT explorer_CoCreateInstanceHook(
|
|||||||
}
|
}
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
else if (IsEqualCLSID(rclsid, &CLSID_TrayUIComponent) && IsEqualIID(riid, &IID_ITrayUIComponent))
|
||||||
|
{
|
||||||
|
if (bOldTaskbar && explorer_TrayUI_CreateInstanceFunc)
|
||||||
|
{
|
||||||
|
*ppv = &instanceof_ITrayUIComponent;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
return CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv);
|
return CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -11845,10 +11828,6 @@ DWORD Inject(BOOL bIsExplorer)
|
|||||||
{
|
{
|
||||||
VnPatchIAT(hExplorer, "user32.dll", (LPCSTR)2005, explorer_SetChildWindowNoActivateHook);
|
VnPatchIAT(hExplorer, "user32.dll", (LPCSTR)2005, explorer_SetChildWindowNoActivateHook);
|
||||||
VnPatchDelayIAT(hExplorer, "ext-ms-win-rtcore-ntuser-window-ext-l1-1-0.dll", "SendMessageW", explorer_SendMessageW);
|
VnPatchDelayIAT(hExplorer, "ext-ms-win-rtcore-ntuser-window-ext-l1-1-0.dll", "SendMessageW", explorer_SendMessageW);
|
||||||
// A certain configuration update in 23560.1000 broke this method, this didn't get called with
|
|
||||||
// "RoGetActivationFactory" anymore. ~~We're now hooking RoGetActivationFactory directly.~~ Pulled back for now.
|
|
||||||
explorer_RoGetActivationFactoryFunc = RoGetActivationFactory;
|
|
||||||
VnPatchIAT(hExplorer, "api-ms-win-core-libraryloader-l1-2-0.dll", "GetProcAddress", explorer_GetProcAddressHook);
|
|
||||||
VnPatchIAT(hExplorer, "shell32.dll", "ShellExecuteW", explorer_ShellExecuteW);
|
VnPatchIAT(hExplorer, "shell32.dll", "ShellExecuteW", explorer_ShellExecuteW);
|
||||||
VnPatchIAT(hExplorer, "shell32.dll", "ShellExecuteExW", explorer_ShellExecuteExW);
|
VnPatchIAT(hExplorer, "shell32.dll", "ShellExecuteExW", explorer_ShellExecuteExW);
|
||||||
VnPatchIAT(hExplorer, "API-MS-WIN-CORE-REGISTRY-L1-1-0.DLL", "RegGetValueW", explorer_RegGetValueW);
|
VnPatchIAT(hExplorer, "API-MS-WIN-CORE-REGISTRY-L1-1-0.DLL", "RegGetValueW", explorer_RegGetValueW);
|
||||||
@ -11900,26 +11879,20 @@ DWORD Inject(BOOL bIsExplorer)
|
|||||||
VnPatchIAT(hExplorer, "user32.dll", "SetWindowCompositionAttribute", explorer_SetWindowCompositionAttribute);
|
VnPatchIAT(hExplorer, "user32.dll", "SetWindowCompositionAttribute", explorer_SetWindowCompositionAttribute);
|
||||||
}
|
}
|
||||||
//VnPatchDelayIAT(hExplorer, "ext-ms-win-rtcore-ntuser-window-ext-l1-1-0.dll", "CreateWindowExW", explorer_CreateWindowExW);
|
//VnPatchDelayIAT(hExplorer, "ext-ms-win-rtcore-ntuser-window-ext-l1-1-0.dll", "CreateWindowExW", explorer_CreateWindowExW);
|
||||||
if (bOldTaskbar && dwIMEStyle)
|
if (bOldTaskbar)
|
||||||
{
|
{
|
||||||
VnPatchIAT(hExplorer, "api-ms-win-core-com-l1-1-0.dll", "CoCreateInstance", explorer_CoCreateInstanceHook);
|
VnPatchIAT(hExplorer, "api-ms-win-core-com-l1-1-0.dll", "CoCreateInstance", explorer_CoCreateInstanceHook);
|
||||||
}
|
|
||||||
if (bOldTaskbar)
|
|
||||||
{
|
|
||||||
VnPatchIAT(hExplorer, "API-MS-WIN-NTUSER-RECTANGLE-L1-1-0.DLL", "SetRect", explorer_SetRect);
|
VnPatchIAT(hExplorer, "API-MS-WIN-NTUSER-RECTANGLE-L1-1-0.DLL", "SetRect", explorer_SetRect);
|
||||||
}
|
|
||||||
if (bOldTaskbar)
|
|
||||||
{
|
|
||||||
VnPatchIAT(hExplorer, "USER32.DLL", "DeleteMenu", explorer_DeleteMenu);
|
VnPatchIAT(hExplorer, "USER32.DLL", "DeleteMenu", explorer_DeleteMenu);
|
||||||
}
|
if (global_rovi.dwBuildNumber >= 22572)
|
||||||
if (bOldTaskbar && global_rovi.dwBuildNumber >= 22572)
|
{
|
||||||
{
|
VnPatchIAT(hExplorer, "dwmapi.dll", "DwmUpdateThumbnailProperties", explorer_DwmUpdateThumbnailPropertiesHook);
|
||||||
VnPatchIAT(hExplorer, "dwmapi.dll", "DwmUpdateThumbnailProperties", explorer_DwmUpdateThumbnailPropertiesHook);
|
PatchExplorer_UpdateWindowAccentProperties();
|
||||||
PatchExplorer_UpdateWindowAccentProperties();
|
}
|
||||||
}
|
}
|
||||||
if (IsWindows11())
|
if (IsWindows11())
|
||||||
{
|
{
|
||||||
// Find a pointer to ITrayUIHost needed to have a working Windows 10 taskbar context menu on Windows 11 taskbar
|
// Find pointers to various stuff needed to have a working Windows 10 taskbar and Windows 10 taskbar context menu on Windows 11 taskbar
|
||||||
// Ref: CTray::Init()
|
// Ref: CTray::Init()
|
||||||
// 4C 8D 05 ? ? ? ? 48 8D 0D ? ? ? ? E8 ? ? ? ? 48 8B
|
// 4C 8D 05 ? ? ? ? 48 8D 0D ? ? ? ? E8 ? ? ? ? 48 8B
|
||||||
// ^^^^^^^ ^^^^^^^
|
// ^^^^^^^ ^^^^^^^
|
||||||
@ -11933,14 +11906,14 @@ DWORD Inject(BOOL bIsExplorer)
|
|||||||
{
|
{
|
||||||
match += 7; // Point to 48
|
match += 7; // Point to 48
|
||||||
g_pTrayUIHost = match + 7 + *(int*)(match + 3);
|
g_pTrayUIHost = match + 7 + *(int*)(match + 3);
|
||||||
// match += 7; // Point to E8
|
match += 7; // Point to E8
|
||||||
// explorer_TrayUI_CreateInstanceFunc = match + 5 + *(int*)(match + 1);
|
explorer_TrayUI_CreateInstanceFunc = match + 5 + *(int*)(match + 1);
|
||||||
printf("ITrayUIHost = %llX\n", (PBYTE)g_pTrayUIHost - (PBYTE)hExplorer);
|
printf("ITrayUIHost = %llX\n", (PBYTE)g_pTrayUIHost - (PBYTE)hExplorer);
|
||||||
// printf("explorer.exe!TrayUI_CreateInstance() = %llX\n", (PBYTE)explorer_TrayUI_CreateInstanceFunc - (PBYTE)hExplorer);
|
printf("explorer.exe!TrayUI_CreateInstance() = %llX\n", (PBYTE)explorer_TrayUI_CreateInstanceFunc - (PBYTE)hExplorer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("Failed to find ITrayUIHost, the custom Windows 11 taskbar context menu will not have the undo function\n");
|
printf("Failed to find ITrayUIHost\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -12181,23 +12154,6 @@ DWORD Inject(BOOL bIsExplorer)
|
|||||||
HANDLE hCombase = LoadLibraryW(L"combase.dll");
|
HANDLE hCombase = LoadLibraryW(L"combase.dll");
|
||||||
if (IsWindows11())
|
if (IsWindows11())
|
||||||
{
|
{
|
||||||
/*if (bOldTaskbar) // TODO Pulled back for now, crashes on 22621.2428
|
|
||||||
{
|
|
||||||
// Hook RoGetActivationFactory() for old taskbar
|
|
||||||
explorer_RoGetActivationFactoryFunc = GetProcAddress(hCombase, "RoGetActivationFactory");
|
|
||||||
if (explorer_RoGetActivationFactoryFunc)
|
|
||||||
{
|
|
||||||
rv = funchook_prepare(
|
|
||||||
funchook,
|
|
||||||
(void**)&explorer_RoGetActivationFactoryFunc,
|
|
||||||
explorer_RoGetActivationFactoryHook
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (rv != 0)
|
|
||||||
{
|
|
||||||
printf("Failed to hook RoGetActivationFactory(). rv = %d\n", rv);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
if (IsWindows11Version22H2OrHigher())
|
if (IsWindows11Version22H2OrHigher())
|
||||||
{
|
{
|
||||||
// Fixed a bug that crashed Explorer when a folder window was opened after a first one was closed on OS builds 22621+
|
// Fixed a bug that crashed Explorer when a folder window was opened after a first one was closed on OS builds 22621+
|
||||||
@ -12259,16 +12215,19 @@ DWORD Inject(BOOL bIsExplorer)
|
|||||||
|
|
||||||
|
|
||||||
HANDLE hPnidui = LoadLibraryW(L"pnidui.dll");
|
HANDLE hPnidui = LoadLibraryW(L"pnidui.dll");
|
||||||
VnPatchIAT(hPnidui, "api-ms-win-core-com-l1-1-0.dll", "CoCreateInstance", pnidui_CoCreateInstanceHook);
|
if (hPnidui)
|
||||||
VnPatchIAT(hPnidui, "user32.dll", "TrackPopupMenu", pnidui_TrackPopupMenuHook);
|
|
||||||
HOOK_IMMERSIVE_MENUS(Pnidui);
|
|
||||||
#ifdef USE_PRIVATE_INTERFACES
|
|
||||||
if (bSkinIcons)
|
|
||||||
{
|
{
|
||||||
VnPatchIAT(hPnidui, "user32.dll", "LoadImageW", SystemTray_LoadImageWHook);
|
VnPatchIAT(hPnidui, "api-ms-win-core-com-l1-1-0.dll", "CoCreateInstance", pnidui_CoCreateInstanceHook);
|
||||||
}
|
VnPatchIAT(hPnidui, "user32.dll", "TrackPopupMenu", pnidui_TrackPopupMenuHook);
|
||||||
|
HOOK_IMMERSIVE_MENUS(Pnidui);
|
||||||
|
#ifdef USE_PRIVATE_INTERFACES
|
||||||
|
if (bSkinIcons)
|
||||||
|
{
|
||||||
|
VnPatchIAT(hPnidui, "user32.dll", "LoadImageW", SystemTray_LoadImageWHook);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
printf("Setup pnidui functions done\n");
|
printf("Setup pnidui functions done\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
@ -12395,32 +12354,35 @@ DWORD Inject(BOOL bIsExplorer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULEINFO mi;
|
if (bOldTaskbar)
|
||||||
GetModuleInformation(GetCurrentProcess(), hWindowsudkShellcommon, &mi, sizeof(MODULEINFO));
|
|
||||||
|
|
||||||
// Fix ReportMonitorRemoved in UpdateStartMenuPositioning crashing, *for now*
|
|
||||||
// We can't use our RtlQueryFeatureConfiguration() hook because our function didn't get called with the feature ID
|
|
||||||
// TODO Need to check again later after this feature flag has been removed
|
|
||||||
// E8 ?? ?? ?? ?? 48 8B 7D ?? 84 C0 74 ?? 48 8D 4F 08
|
|
||||||
PBYTE match = FindPattern(
|
|
||||||
hWindowsudkShellcommon,
|
|
||||||
mi.SizeOfImage,
|
|
||||||
"\xE8\x00\x00\x00\x00\x48\x8B\x7D\x00\x84\xC0\x74\x00\x48\x8D\x4F\x08",
|
|
||||||
"x????xxx?xxx?xxxx"
|
|
||||||
);
|
|
||||||
if (match)
|
|
||||||
{
|
{
|
||||||
match += 5 + *(int*)(match + 1);
|
MODULEINFO mi;
|
||||||
windowsudkshellcommon_TaskbarMultiMonIsEnabledFunc = match;
|
GetModuleInformation(GetCurrentProcess(), hWindowsudkShellcommon, &mi, sizeof(MODULEINFO));
|
||||||
printf("wil::details::FeatureImpl<__WilFeatureTraits_Feature_Servicing_TaskbarMultiMon_38545217>::__private_IsEnabled() = %llX\n", match - (PBYTE)hWindowsudkShellcommon);
|
|
||||||
rv = funchook_prepare(
|
|
||||||
funchook,
|
|
||||||
(void**)&windowsudkshellcommon_TaskbarMultiMonIsEnabledFunc,
|
|
||||||
windowsudkshellcommon_TaskbarMultiMonIsEnabledHook
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("Setup windowsudk.shellcommon functions done\n");
|
// Fix ReportMonitorRemoved in UpdateStartMenuPositioning crashing, *for now*
|
||||||
|
// We can't use our RtlQueryFeatureConfiguration() hook because our function didn't get called with the feature ID
|
||||||
|
// TODO Need to check again later after this feature flag has been removed
|
||||||
|
// E8 ?? ?? ?? ?? 48 8B 7D ?? 84 C0 74 ?? 48 8D 4F 08
|
||||||
|
PBYTE match = FindPattern(
|
||||||
|
hWindowsudkShellcommon,
|
||||||
|
mi.SizeOfImage,
|
||||||
|
"\xE8\x00\x00\x00\x00\x48\x8B\x7D\x00\x84\xC0\x74\x00\x48\x8D\x4F\x08",
|
||||||
|
"x????xxx?xxx?xxxx"
|
||||||
|
);
|
||||||
|
if (match)
|
||||||
|
{
|
||||||
|
match += 5 + *(int*)(match + 1);
|
||||||
|
windowsudkshellcommon_TaskbarMultiMonIsEnabledFunc = match;
|
||||||
|
printf("wil::details::FeatureImpl<__WilFeatureTraits_Feature_Servicing_TaskbarMultiMon_38545217>::__private_IsEnabled() = %llX\n", match - (PBYTE)hWindowsudkShellcommon);
|
||||||
|
rv = funchook_prepare(
|
||||||
|
funchook,
|
||||||
|
(void**)&windowsudkshellcommon_TaskbarMultiMonIsEnabledFunc,
|
||||||
|
windowsudkshellcommon_TaskbarMultiMonIsEnabledHook
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("Setup windowsudk.shellcommon functions done\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,127 +5,6 @@
|
|||||||
RTL_OSVERSIONINFOW global_rovi;
|
RTL_OSVERSIONINFOW global_rovi;
|
||||||
DWORD32 global_ubr;
|
DWORD32 global_ubr;
|
||||||
|
|
||||||
#pragma region "Weird stuff"
|
|
||||||
/***
|
|
||||||
Let me explain the weird stuff. This was not documented here before so updating this was a hell of a task.
|
|
||||||
|
|
||||||
Our target is in `CTray::Init()`. It constructs either the Windows 11 or the Windows 10 taskbar based on the result of
|
|
||||||
`winrt::WindowsUdk::ApplicationModel::AppExtensions::XamlExtensions::IsExtensionAvailable()`. We have to make the last
|
|
||||||
argument of that function be set to false, so that we'll get the Windows 10 taskbar. In order to make a patch that does
|
|
||||||
not use patterns, we hook `RoGetActivationFactory` and return a dummy object with our own specially crafted vtable.
|
|
||||||
|
|
||||||
So the calls are as follows:
|
|
||||||
|
|
||||||
`CTray::Init()` calls `factory_cache_entry<XamlExtensions, IXamlExtensionsStatics>::call()` to get an interface to
|
|
||||||
`XamlExtensions` (located in windowsudk.shellcommon.dll) through `IXamlExtensionsStatics`. First, the factory cache
|
|
||||||
system tries to retrieve its activation factory. It calls `RoGetActivationFactory` with the `IID` of
|
|
||||||
`IXamlExtensionsStatics`. Our hook makes that function return a dummy `IXamlExtensionsStatics` with our own vtable.
|
|
||||||
Despite the name, it is an activation factory. (Ref: `explorer_RoGetActivationFactoryHook()` in dllmain.c)
|
|
||||||
|
|
||||||
Then, the cache system checks if the factory implements `IAgileObject` by calling `QueryInterface(IID_IAgileObject)` of
|
|
||||||
the factory. This will be used to determine if the factory should be cached or not. We intercept this call and do
|
|
||||||
nothing to make the process easy, so the factory will never be cached. In reality, `XamlExtensions` does not implement
|
|
||||||
`IAgileObject`.
|
|
||||||
|
|
||||||
Then, the cache system calls the lambda that's passed into `factory_cache_entry<~>::call()` in order to retrieve an
|
|
||||||
interface that can be used. The lambda that `CTray::Init()` passes into the system, retrieves an instance of
|
|
||||||
`XamlExtensions` by calling `IXamlExtensionsStatics::Current()` of the factory using COM. Here, we intercept the call
|
|
||||||
through our custom `IXamlExtensionsStatics` vtable and return a dummy `XamlExtensions` instance with our own vtable
|
|
||||||
whose `QueryInterface()` with the IID of `IXamlExtensions2` returns a dummy `IXamlExtensions2` with our own vtable.
|
|
||||||
|
|
||||||
On builds with the "Never combine" feature on the new taskbar, it uses `IXamlExtensionsStatics2::GetForCategory()`
|
|
||||||
instead of `IXamlExtensionsStatics::Current()`.
|
|
||||||
|
|
||||||
Now that `CTray::Init()` has an instance of `XamlExtensions`, it calls `IXamlExtensions2::IsExtensionAvailable()`.
|
|
||||||
As the name says, if the extension (or Windows 11 taskbar) is available, `CTray::Init()` will continue to make the
|
|
||||||
Windows 11 taskbar through `CTray::InitializeTrayUIComponent()`. Otherwise, it will make the Windows 10 taskbar through
|
|
||||||
`TrayUI_CreateInstance()` that has been since ages.
|
|
||||||
|
|
||||||
`CTray::Init()` gets that value through the `IXamlExtensions2` interface of the `XamlExtensions` instance. COM calls are
|
|
||||||
made, which are `QueryInterface(IID_IXamlExtensions2)` and `IXamlExtensions2::IsExtensionAvailable()` itself. We
|
|
||||||
intercept the former call through our custom vtable for our dummy `XamlExtensions` instance to return a dummy
|
|
||||||
`IXamlExtensions2` with our own vtable too. Then, we intercept the latter call through our custom `IXamlExtensions2`
|
|
||||||
vtable to have the last argument set to false, and now we have the good old taskbar.
|
|
||||||
***/
|
|
||||||
|
|
||||||
static ULONG STDMETHODCALLTYPE nimplAddRefRelease(IUnknown* This)
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE nimplReturnHResultNotImpl(IUnknown* This)
|
|
||||||
{
|
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics_QueryInterface(WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics* This, REFIID riid, void** ppvObject)
|
|
||||||
{
|
|
||||||
// Should only be called with IID_IAgileObject
|
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics_Current(WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics* This, void** _instance_of_winrt_WindowsUdk_ApplicationModel_AppExtensions_XamlExtensions)
|
|
||||||
{
|
|
||||||
*_instance_of_winrt_WindowsUdk_ApplicationModel_AppExtensions_XamlExtensions = &instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2_GetForCategory(WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2* This, HSTRING a2, void** _instance_of_winrt_WindowsUdk_ApplicationModel_AppExtensions_XamlExtensions)
|
|
||||||
{
|
|
||||||
*_instance_of_winrt_WindowsUdk_ApplicationModel_AppExtensions_XamlExtensions = &instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2_QueryInterface(WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2* This, REFIID riid, void** ppvObject)
|
|
||||||
{
|
|
||||||
if (IsEqualIID(riid, &IID_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2))
|
|
||||||
{
|
|
||||||
*ppvObject = &instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
return E_NOTIMPL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2_IsExtensionAvailable(WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2* This, HSTRING a2, HSTRING a3, BYTE* a4)
|
|
||||||
{
|
|
||||||
*a4 = 0;
|
|
||||||
return S_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStaticsVtbl instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStaticsVtbl = {
|
|
||||||
.QueryInterface = WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics_QueryInterface,
|
|
||||||
.AddRef = nimplAddRefRelease,
|
|
||||||
.Release = nimplAddRefRelease,
|
|
||||||
.GetIids = nimplReturnHResultNotImpl,
|
|
||||||
.GetRuntimeClassName = nimplReturnHResultNotImpl,
|
|
||||||
.GetTrustLevel = nimplReturnHResultNotImpl,
|
|
||||||
.Current = WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics_Current
|
|
||||||
};
|
|
||||||
const WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics = { &instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStaticsVtbl };
|
|
||||||
|
|
||||||
static const WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2Vtbl instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2Vtbl = {
|
|
||||||
.QueryInterface = WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics_QueryInterface,
|
|
||||||
.AddRef = nimplAddRefRelease,
|
|
||||||
.Release = nimplAddRefRelease,
|
|
||||||
.GetIids = nimplReturnHResultNotImpl,
|
|
||||||
.GetRuntimeClassName = nimplReturnHResultNotImpl,
|
|
||||||
.GetTrustLevel = nimplReturnHResultNotImpl,
|
|
||||||
.GetForCategory = WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2_GetForCategory
|
|
||||||
};
|
|
||||||
const WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2 instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2 = { &instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2Vtbl };
|
|
||||||
|
|
||||||
static const WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2Vtbl instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2Vtbl = {
|
|
||||||
.QueryInterface = WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2_QueryInterface,
|
|
||||||
.AddRef = nimplAddRefRelease,
|
|
||||||
.Release = nimplAddRefRelease,
|
|
||||||
.GetIids = nimplReturnHResultNotImpl,
|
|
||||||
.GetRuntimeClassName = nimplReturnHResultNotImpl,
|
|
||||||
.GetTrustLevel = nimplReturnHResultNotImpl,
|
|
||||||
.IsExtensionAvailable = WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2_IsExtensionAvailable
|
|
||||||
};
|
|
||||||
const WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2 instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2 = { &instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2Vtbl };
|
|
||||||
#pragma endregion
|
|
||||||
|
|
||||||
void printf_guid(GUID guid)
|
void printf_guid(GUID guid)
|
||||||
{
|
{
|
||||||
printf("Guid = {%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX}\n",
|
printf("Guid = {%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX}\n",
|
||||||
|
@ -81,160 +81,55 @@ HRESULT ShellExecuteFromExplorer(
|
|||||||
|
|
||||||
void ToggleTaskbarAutohide();
|
void ToggleTaskbarAutohide();
|
||||||
|
|
||||||
#pragma region "Weird stuff"
|
#pragma region "Enable old taskbar"
|
||||||
typedef interface WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics;
|
typedef interface ITrayUIHost ITrayUIHost;
|
||||||
|
|
||||||
DEFINE_GUID(IID_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics,
|
typedef interface ITrayUI ITrayUI;
|
||||||
0x18c02f2e,
|
|
||||||
0x2754, 0x5a20, 0x8b, 0xd5,
|
DEFINE_GUID(IID_ITrayUI,
|
||||||
0x0b, 0x34, 0xce, 0x79, 0xda, 0x2b
|
0x12b454e1,
|
||||||
|
0x6e50, 0x42b8, 0xbc, 0x3e,
|
||||||
|
0xae, 0x7f, 0x54, 0x91, 0x99, 0xd6
|
||||||
);
|
);
|
||||||
|
|
||||||
typedef struct WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStaticsVtbl // : IInspectableVtbl
|
typedef interface ITrayUIComponent ITrayUIComponent;
|
||||||
|
|
||||||
|
DEFINE_GUID(IID_ITrayUIComponent,
|
||||||
|
0x27775f88,
|
||||||
|
0x01d3, 0x46ec, 0xa1, 0xc1,
|
||||||
|
0x64, 0xb4, 0xc0, 0x9b, 0x21, 0x1b
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef struct ITrayUIComponentVtbl // : IUnknownVtbl
|
||||||
{
|
{
|
||||||
BEGIN_INTERFACE
|
BEGIN_INTERFACE
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* QueryInterface)(
|
HRESULT(STDMETHODCALLTYPE* QueryInterface)(
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics* This,
|
__RPC__in ITrayUIComponent* This,
|
||||||
/* [in] */ __RPC__in REFIID riid,
|
/* [in] */ __RPC__in REFIID riid,
|
||||||
/* [annotation][iid_is][out] */
|
/* [annotation][iid_is][out] */
|
||||||
_COM_Outptr_ void** ppvObject);
|
_COM_Outptr_ void** ppvObject);
|
||||||
|
|
||||||
ULONG(STDMETHODCALLTYPE* AddRef)(
|
ULONG(STDMETHODCALLTYPE* AddRef)(
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics* This);
|
__RPC__in ITrayUIComponent* This);
|
||||||
|
|
||||||
ULONG(STDMETHODCALLTYPE* Release)(
|
ULONG(STDMETHODCALLTYPE* Release)(
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics* This);
|
__RPC__in ITrayUIComponent* This);
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* GetIids)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics* This,
|
|
||||||
/* [out] */ __RPC__out ULONG* iidCount,
|
|
||||||
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID** iids);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* GetRuntimeClassName)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics* This,
|
|
||||||
/* [out] */ __RPC__deref_out_opt HSTRING* className);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* GetTrustLevel)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics* This,
|
|
||||||
/* [out] */ __RPC__out TrustLevel* trustLevel);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* Current)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics* This,
|
|
||||||
/* [out] */ __RPC__out void** _instance_of_winrt_WindowsUdk_ApplicationModel_AppExtensions_XamlExtensions);
|
|
||||||
|
|
||||||
|
HRESULT(STDMETHODCALLTYPE* InitializeWithTray)(
|
||||||
|
__RPC__in ITrayUIComponent* This,
|
||||||
|
/* [in] */ __RPC__in ITrayUIHost* host,
|
||||||
|
/* [out] */ __RPC__out ITrayUI** result);
|
||||||
END_INTERFACE
|
END_INTERFACE
|
||||||
} WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStaticsVtbl;
|
} ITrayUIComponentVtbl;
|
||||||
|
|
||||||
interface WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics // : IInspectable
|
interface ITrayUIComponent // : IInspectable
|
||||||
{
|
{
|
||||||
const struct WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStaticsVtbl* lpVtbl;
|
const struct ITrayUIComponentVtbl* lpVtbl;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef interface WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2 WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2;
|
extern const ITrayUIComponent instanceof_ITrayUIComponent;
|
||||||
|
HRESULT(*explorer_TrayUI_CreateInstanceFunc)(ITrayUIHost* host, REFIID riid, void** ppv);
|
||||||
DEFINE_GUID(IID_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2,
|
|
||||||
0x0fe87da5,
|
|
||||||
0xa7a6, 0x5de3, 0x83, 0x5f,
|
|
||||||
0xd9, 0x8c, 0x87, 0x56, 0x01, 0x44
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef struct WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2Vtbl // : IInspectableVtbl
|
|
||||||
{
|
|
||||||
BEGIN_INTERFACE
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* QueryInterface)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2* This,
|
|
||||||
/* [in] */ __RPC__in REFIID riid,
|
|
||||||
/* [annotation][iid_is][out] */
|
|
||||||
_COM_Outptr_ void** ppvObject);
|
|
||||||
|
|
||||||
ULONG(STDMETHODCALLTYPE* AddRef)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2* This);
|
|
||||||
|
|
||||||
ULONG(STDMETHODCALLTYPE* Release)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2* This);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* GetIids)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2* This,
|
|
||||||
/* [out] */ __RPC__out ULONG* iidCount,
|
|
||||||
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID** iids);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* GetRuntimeClassName)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2* This,
|
|
||||||
/* [out] */ __RPC__deref_out_opt HSTRING* className);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* GetTrustLevel)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2* This,
|
|
||||||
/* [out] */ __RPC__out TrustLevel* trustLevel);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* GetForCategory)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2* This,
|
|
||||||
__RPC__in HSTRING a2,
|
|
||||||
/* [out] */ __RPC__out void** _instance_of_winrt_WindowsUdk_ApplicationModel_AppExtensions_XamlExtensions);
|
|
||||||
|
|
||||||
END_INTERFACE
|
|
||||||
} WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2Vtbl;
|
|
||||||
|
|
||||||
interface WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2 // : IInspectable
|
|
||||||
{
|
|
||||||
const struct WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2Vtbl* lpVtbl;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef interface WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2 WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2;
|
|
||||||
|
|
||||||
DEFINE_GUID(IID_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2,
|
|
||||||
0x34a95314,
|
|
||||||
0xca5c, 0x5fad, 0xae, 0x7c,
|
|
||||||
0x1a, 0x90, 0x18, 0x11, 0x66, 0xc1
|
|
||||||
);
|
|
||||||
|
|
||||||
typedef struct WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2Vtbl // : IInspectableVtbl
|
|
||||||
{
|
|
||||||
BEGIN_INTERFACE
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* QueryInterface)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2* This,
|
|
||||||
/* [in] */ __RPC__in REFIID riid,
|
|
||||||
/* [annotation][iid_is][out] */
|
|
||||||
_COM_Outptr_ void** ppvObject);
|
|
||||||
|
|
||||||
ULONG(STDMETHODCALLTYPE* AddRef)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2* This);
|
|
||||||
|
|
||||||
ULONG(STDMETHODCALLTYPE* Release)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2* This);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* GetIids)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2* This,
|
|
||||||
/* [out] */ __RPC__out ULONG* iidCount,
|
|
||||||
/* [size_is][size_is][out] */ __RPC__deref_out_ecount_full_opt(*iidCount) IID** iids);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* GetRuntimeClassName)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2* This,
|
|
||||||
/* [out] */ __RPC__deref_out_opt HSTRING* className);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* GetTrustLevel)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2* This,
|
|
||||||
/* [out] */ __RPC__out TrustLevel* trustLevel);
|
|
||||||
|
|
||||||
HRESULT(STDMETHODCALLTYPE* IsExtensionAvailable)(
|
|
||||||
__RPC__in WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2* This,
|
|
||||||
__RPC__in HSTRING a2,
|
|
||||||
__RPC__in HSTRING a3,
|
|
||||||
/* [out] */ __RPC__out BYTE* a4);
|
|
||||||
|
|
||||||
END_INTERFACE
|
|
||||||
} WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2Vtbl;
|
|
||||||
|
|
||||||
interface WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2 // : IInspectable
|
|
||||||
{
|
|
||||||
const struct WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2Vtbl* lpVtbl;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern const WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics;
|
|
||||||
extern const WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2 instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensionsStatics2;
|
|
||||||
extern const WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2 instanceof_WindowsUdk_ApplicationModel_AppExtensions_IXamlExtensions2;
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
inline int FileExistsW(wchar_t* file)
|
inline int FileExistsW(wchar_t* file)
|
||||||
|
@ -1235,7 +1235,7 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
|
|||||||
GUI_SubstituteLocalizedString(text, MAX_LINE_LENGTH);
|
GUI_SubstituteLocalizedString(text, MAX_LINE_LENGTH);
|
||||||
if (_this->sectionNames[currentSection + 1][0] == 0)
|
if (_this->sectionNames[currentSection + 1][0] == 0)
|
||||||
{
|
{
|
||||||
wcscpy_s(_this->sectionNames[currentSection + 1], 20, text);
|
wcscpy_s(_this->sectionNames[currentSection + 1], 32, text);
|
||||||
}
|
}
|
||||||
if (hDC)
|
if (hDC)
|
||||||
{
|
{
|
||||||
|
@ -84,7 +84,7 @@ typedef struct _GUI
|
|||||||
void* pAccPropServices;
|
void* pAccPropServices;
|
||||||
HWND hAccLabel;
|
HWND hAccLabel;
|
||||||
BOOL bShouldAnnounceSelected;
|
BOOL bShouldAnnounceSelected;
|
||||||
WCHAR sectionNames[20][20];
|
WCHAR sectionNames[20][32];
|
||||||
BOOL bRebuildIfTabOrderIsEmpty;
|
BOOL bRebuildIfTabOrderIsEmpty;
|
||||||
int dwPageLocation;
|
int dwPageLocation;
|
||||||
DWORD last_section;
|
DWORD last_section;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user