1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2025-01-19 01:04:08 +01:00

GUI, Main: Support for File Explorer - Control interface setting on OS builds 22621+

This commit is contained in:
Valentin Radu 2022-08-07 02:30:47 +03:00
parent c96aebee11
commit 0c2f287d57
2 changed files with 8 additions and 5 deletions

View File

@ -1909,6 +1909,7 @@ DWORD FixTaskbarAutohide(DWORD unused)
#pragma region "EnsureXAML on OS builds 22621+"
#ifdef _WIN64
DEFINE_GUID(uuidof_Windows_Internal_Shell_XamlExplorerHost_IXamlApplicationStatics,
0xECC13292, 0x27EF, 0x547A, 0xAC, 0x8B, 0x76, 0xCD, 0x17, 0x32, 0x21, 0x86);
@ -2041,6 +2042,7 @@ HMODULE __fastcall Windows11v22H2_combase_LoadLibraryExW(LPCWSTR lpLibFileName,
}
return hModule;
}
#endif
#pragma endregion
@ -8523,24 +8525,27 @@ HRESULT shell32_DriveTypeCategorizer_CreateInstanceHook(IUnknown* pUnkOuter, REF
return shell32_DriveTypeCategorizer_CreateInstanceFunc(pUnkOuter, riid, ppvObject);
}
#endif
#pragma endregion
#pragma region "Disable ribbon in File Explorer"
#pragma region "File Explorer command bar and ribbon support"
DEFINE_GUID(CLSID_UIRibbonFramework,
0x926749FA, 0x2615, 0x4987, 0x88, 0x45, 0xC3, 0x3E, 0x65, 0xF2, 0xB9, 0x57);
DEFINE_GUID(IID_UIRibbonFramework,
0xF4F0385D, 0x6872, 0x43A8, 0xAD, 0x09, 0x4C, 0x33, 0x9C, 0xB3, 0xF5, 0xC5);
HRESULT ExplorerFrame_CoCreateInstanceHook(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID riid, LPVOID* ppv)
{
if ((dwFileExplorerCommandUI != 0) && *(INT64*)&rclsid->Data1 == 0x4D1E5A836480100B && *(INT64*)rclsid->Data4 == 0x339A8EA8E58A699F)
{
return REGDB_E_CLASSNOTREG;
}
if (dwFileExplorerCommandUI == 2 && IsEqualCLSID(rclsid, &CLSID_UIRibbonFramework) && IsEqualIID(riid, &IID_UIRibbonFramework))
{
return REGDB_E_CLASSNOTREG;
}
return CoCreateInstance(rclsid, pUnkOuter, dwClsContext, riid, ppv);
}
#endif
#pragma endregion

View File

@ -206,14 +206,12 @@
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Use classic drive groupings in This PC
"UseClassicDriveGrouping"=dword:00000000
;s Explorer_ControlInterface !IsWindows11Version22H2OrHigher
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 3 Control Interface *
;x 0 Windows 11 Command Bar (default)
;x 1 Windows 10 Ribbon
;x 2 Windows 7 Command Bar
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_FileExplorerCommandUI"=dword:00000000
;g Explorer_ControlInterface
;t The following settings take effect on newly created File Explorer windows:
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;i Use immersive menus when displaying Windows 10 context menus **