Compare commits

..

456 Commits

Author SHA1 Message Date
Amrsatrio 738479020b Version: 26100.4946.69.6 1 month ago
Amrsatrio 48e1de3379 Taskbar10: Apply vtable-based hooks to ep_taskbar (#4097) 1 month ago
Amrsatrio df7d604169 File Explorer: On TIFE-equipped builds, fix 7 command bar menu bar behavior and fix 10 ribbon window saving - ARM64 (#2243, #2676) 1 month ago
Amrsatrio 75178ec35c File Explorer: On TIFE-equipped builds, fix 7 command bar menu bar behavior and fix 10 ribbon window saving - x64 (#2243, #2676) 1 month ago
Amrsatrio a80d9dc844 File Explorer: Fix Alt+D not working on builds with modern navigation bar feature flag enabled (#2847) 1 month ago
Amrsatrio 80414f5a80 File Explorer: Disable XAML views when Windows 11 command bar is disabled (#3447) 1 month ago
Amrsatrio 47b44ccc45 [skip ci] Update documents 2 months ago
Amrsatrio 206dcf5d6c Version: 26100.4946.69.5 2 months ago
Amrsatrio c08b0a6a6b Start10: Fix 24H2/25H2 fix pattern for ARM64 to have an unintended match on 22H2/23H2 2 months ago
Miles Prower 891edc2cdd
Delete .github/workflows/issue-check.yml 2 months ago
Amrsatrio f5eddacd10 Version: 26100.4946.69.4 3 months ago
Amrsatrio 9e9103004f File Explorer: Correct shrunk address bar toolbar button size when Servicing_CFDNavButtonsTheming (NI: 56845961, GE: 52061322) is enabled (#4552) 3 months ago
Amrsatrio f4e9faf876 Version: 26100.4946.69.3 3 months ago
Amrsatrio afd109f340 Start10: Mitigate breakage caused by feature flag 58205615 (#4523) 3 months ago
Amrsatrio 6d946bd4de File Explorer: Updated shrink address bar patterns to account for non-inlined CAddressBand::_GetAdjustedClientRect() in recent GE builds (#4552) 3 months ago
Amrsatrio 18dfcd02ce Update various twinui.pcshell.dll patterns 3 months ago
Amrsatrio 4434d10445 Start10: Add new bTransitioningToCortana pattern for 27938+ ^3 3 months ago
Amrsatrio 465117e3d7 [skip ci] Start10: Add new bTransitioningToCortana pattern for 27938+ ^2 3 months ago
Amrsatrio f873888a3b Start10: Add new bTransitioningToCortana pattern for 27938+ 3 months ago
Amrsatrio 79f8dd3265 Start10: Harden CStartExperienceManager::GetMonitorInformation() patterns for ARM64 3 months ago
Amrsatrio 201a7e5bed Start10: Revise CStartExperienceManager::Hide() patching on ARM64. 3 months ago
Amrsatrio caa2452872 Fix CLauncherTipContextMenu::_ExecuteCommand() pattern for latest 24H2/25H2 (#4370) 3 months ago
Amrsatrio f1127191e6 Version: 26100.4946.69.2 3 months ago
Amrsatrio 6959c699d9 ep_weather: Draw weather icon element directly instead of through createImageBitmap (#4545) 3 months ago
Amrsatrio 9abef1f986 [skip ci] Update FUNDING.yml 3 months ago
Amrsatrio aa1a240d4a [skip ci] Update FUNDING.yml 3 months ago
Amrsatrio 1b977ad3ad Update README.md 3 months ago
Amrsatrio 84aeeaca76 Version: 26100.5074.69.1 3 months ago
Amrsatrio ad2fa72c02 Default to Windows 10 (EP) taskbar, then Windows 10 stock taskbar, then Windows 11 taskbar 3 months ago
m-wigley 72c6983947
GUI: Hide the win8 network flyout as an option on Win 11 after 25346 as van.dll was removed (#4478) 3 months ago
Amrsatrio 1bbe207c83 Taskbar10: Fix TrayThreadBSTA (54481602) taskbar thread flags for compatibility with taskbar toolbars 3 months ago
Amrsatrio ab99f26687 Taskbar10: ep_taskbar now statically links to private functions 3 months ago
Amrsatrio ff30457ff5 Change hooking library to SlimDetours. 3 months ago
Amrsatrio 0beace9080 Update copyright year 4 months ago
Amrsatrio fa19402bff SettingsMonitor: There is a bug in Explorer windows where WM_SETTINGCHANGE would scroll the ItemsView to the top, we minimize the damage due to this by pinpointing the WM_SETTINGCHANGE message to taskbar window. 4 months ago
Amrsatrio 66818fed7d Fix GUID of ITaskListWndSite 4 months ago
Amrsatrio 2633903d19 TaskbarCenter: Update TaskbarCenter_IsTaskbarHorizontal to be safer 4 months ago
Amrsatrio ab8f507ffe TaskbarCenter: Begin converting to cpp 4 months ago
Sand 583fa534d7
Unlock HideIconAndTitleInExplorer from being <22H2 only (#4464) 4 months ago
m-wigley 9106226861
Fix Hiding of Recommended Section on Win 11 24h2 (#4476) 4 months ago
David Sidrane c3c83ffab5
Fix Weather ep_weather_provider_google_script:use classname to get image ID that is now dynamic (#4392) 4 months ago
Amrsatrio 14807a50a8 Version: 22631.5335.68.2 7 months ago
Amrsatrio 3a93b76032 Version: 22631.5335.68.1 7 months ago
Amrsatrio ab2a4f3575 Start10: Fix start menu animation patch on 27802.1000+ ARM64 (x64 unaffected) 7 months ago
Amrsatrio 3f1176600e L10N: Include country name in the language list 7 months ago
Amrsatrio 44c670bfe8 GUI: Fix some mistakes 7 months ago
Amrsatrio 97f8d519fd Update submodules 7 months ago
Amrsatrio 207f669a62 Win+X: Adjust the CreateInstance hook to not fail when the QueryInterface fails 7 months ago
Amrsatrio b72a8052c0 Add entry point for audio flyout reimplementation 7 months ago
Amrsatrio 1b20cbd342 WinX: Revised patch method, hide/unhide Terminal entries accordingly, and updated ARM64 patterns 7 months ago
Amrsatrio 858b634067 Setup: Ensure DWM patcher service is unregistered during servicing 8 months ago
Amrsatrio 65d8b53697 Taskbar10: Added the entry point for the experimental Start Screen implementation in ep_taskbar 8 months ago
Amrsatrio 115b462f96 ep_dwm: Renamed ep_dwm.exe to ep_dwm_svc.exe 9 months ago
Amrsatrio 0e55f304c4 Taskbar10: Fix stack corruption in dynamically linked NtDCompositionGetFrameStatistics call on 11 21H2+ 9 months ago
Amrsatrio 8b4d8db628 Fix immersive menu disabling on ARM64 10 months ago
Amrsatrio 80b5d73d22 GUI: Don't use MB_PRECOMPOSED due to failing on 15063 10 months ago
Amrsatrio 1edb989406 Taskbar10: Allow loading ep_taskbar.0.dll on all major Windows 10 versions 10 months ago
Amrsatrio c64a17e78f Setup: Display the failure line number to assist in troubleshooting + include taskbar variants 0 and 1 10 months ago
Kichura 48f3873e1c
CI: Update OS images, Do not persist credentials, Checkout v4 (#4071) 11 months ago
Amrsatrio 1f53188b55 Try to fix ARM64 compile 12 months ago
ImSwordQueen 6e4c69cc61
Improve the Issues tab by adding forms and auto-comment/close malware related issues (#4046) 12 months ago
Amrsatrio 123ea8b12c Start10: Updated x64 patterns for fixing Pin to Start/Unpin from Start context menu item in the Start menu ^2 12 months ago
Amrsatrio 4ef3667bd4 Start10: Updated x64 patterns for fixing Pin to Start/Unpin from Start context menu item in the Start menu 1 year ago
Amrsatrio aec8c7036f GUI: Add option for ep_taskbar in Windows 10 1 year ago
Amrsatrio 9f71a5c885 GUI: Add dropdown/popup menu indicators 1 year ago
Amrsatrio 1be66581c1 Taskbar10: Better TaskbarSd handling. (#4020) 1 year ago
Amrsatrio 33c4611b4c Some renames 1 year ago
Amrsatrio f80478b2f4 Start10: Update pattern in PatchUnifiedTilePinUnpinProvider to work with 27718 1 year ago
Amrsatrio 6add2999ab Taskbar10: Don't crash if stobject.dll is not present 1 year ago
Amrsatrio 5451e1e28a Update README.md 1 year ago
Amrsatrio b93337a98b Update CHANGELOG.md 1 year ago
Amrsatrio 4978024ea4 Start10: Use the latest known good JumpViewUI.dll on 22H2 and up 1 year ago
Amrsatrio ac10697103 Version: 22621.4317.67.1 1 year ago
Amrsatrio fc25c25df9 Start10: Un-hardcode Program Files path 1 year ago
Amrsatrio cc9b6b3fd0 Taskbar10: Revised the method for hooking ShowLauncherTipContextMenu (#3837) 1 year ago
Curious Insatiable 78e6248c60
GUI: Fix IDS_UPDATES_DLFAILED_B (#3714) 1 year ago
Amrsatrio 107219d27a Update CHANGELOG.md 1 year ago
Amrsatrio 194b881bff Update L10N 1 year ago
Amrsatrio 90c52c430c Version: 22621.3880.66.7 1 year ago
Amrsatrio 2a6fb1507d GUI: Remove IDS_TB_GLOM_2_D 1 year ago
Amrsatrio 2bd624096a ep_taskbar: Enable Win+X 1 year ago
Amrsatrio eb1f1ec95b Taskbar10/Taskbar11: Removed code for redirecting TaskbarGlomLevel registry value 1 year ago
Amrsatrio 41877b694b Weather: Now works with ep_taskbar 1 year ago
Amrsatrio 92fce8c902 Version: 22621.3880.66.6 1 year ago
Amrsatrio 98118101e6 Cleaned some unneeded stuff in the setup binary, and restored exported functions for launching/restarting Explorer 1 year ago
Amrsatrio ac14c75e49 Updates: Fixed a bug where empty UpdateURL registry values would break the updates system (#3668) 1 year ago
Amr Satrio 5fb1241dff
Update README.md 1 year ago
Amrsatrio 5094108275 Setup: Always unpack StartUI stuff on 22H2+ 1 year ago
Amrsatrio 2188f0ac87 GUI: Attempt to fix internal compiler error 1 year ago
Amrsatrio 77c6a8c23e Update sws 1 year ago
Amrsatrio beeca29d45 Update sws and ep_dwm 1 year ago
Amrsatrio c89705e5e2 Fixed some function calls 1 year ago
Amrsatrio 3885b97bdb Version: 22621.3880.66.5 1 year ago
Amrsatrio 2ea3894bcf Start10: Increased reliability of ARM64 patterns for restoring the animations and fixing positioning (#3566) 1 year ago
Amrsatrio 0f38628355 Start10: Fixed symbols mechanism when custom StartUI_.dll is used 1 year ago
Amrsatrio 060066cd53 Taskbar11: Fixed Task manager menu entry doing nothing on 24H2+ (#3021, #3556) 1 year ago
Amrsatrio 351a0207a4 Taskbar10: Fixed jump list positioning patch on latest builds with `TaskbarJumplistOnHover` feature flag (#3615) 1 year ago
Amrsatrio a8bd290977 Taskbar10: Add support for loading ep_taskbar on Windows 10 1904x 1 year ago
Amrsatrio 3c50ea3c68 Setup: Unpack Windows.UI.ShellCommon only on builds without StartUI shipped 1 year ago
Amrsatrio c127c0573c Build: Disable encryption 1 year ago
Amr Satrio ab5862b863
Build: Disable encryption 1 year ago
Amrsatrio ab389ed6ef Version: 22621.3880.66.4 (pre-release) 1 year ago
Amrsatrio b4731146a2 Setup: Bundle pnidui.dll and StartUI.dll due to uncertainties in MS' symbol servers 1 year ago
Amrsatrio d9595fccc6 Build: Include ep_taskbar again 1 year ago
Amrsatrio 7e0f7ebc22 Setup: Add pnidui.dll and 10 start menu resources. 1 year ago
Amrsatrio 755f101285 Start10: Updated method for using the old start menu 1 year ago
Amrsatrio e60c5ff596 Taskbar11: Load the classic context menu from EP's taskbar implementation if the context menu does not exist in explorer.exe ^2 1 year ago
Amrsatrio bfca879e68 Taskbar11: Load the classic context menu from EP's taskbar implementation if the context menu does not exist in explorer.exe 1 year ago
Amrsatrio 39609e4b54 Taskbar10: Fix broken taskbar jump list positioning caused by 40874676 (#3515) 1 year ago
Amrsatrio 23b44a2f23 Split twinui.pcshell.dll patches into their own file 1 year ago
Amrsatrio ea5881f177 Start10: Fix positioning when the taskbar is placed vertically (#3462) 1 year ago
Amrsatrio de2532ddcd Start10: Fix positioning when the taskbar is not placed at the bottom, on 24H2 builds 1 year ago
Amrsatrio c8434659cc Setup: Rename ARM64 setup from ep_setup.arm64.exe into ep_setup_arm64.exe 1 year ago
Amrsatrio 7444c7cb52 Version: 22621.3880.66.3 (pre-release) 1 year ago
Amrsatrio c0201ff442 Build: Try to fix ep_make ^2 1 year ago
Amrsatrio 126c024628 Build: Try to fix ep_make 1 year ago
Amrsatrio db54ce9d4b Build: Oops 1 year ago
Amrsatrio 04fd2b7647 Build: Don't build CMake projects in the vcxproj because it doesn't work with GitHub Actions 1 year ago
Amrsatrio b253625cdf Build: Update .gitmodules 1 year ago
Amrsatrio 30579b0238 Setup: Revised the method for bundling files in the setup binary. 1 year ago
Amrsatrio 1fcd7d7322 Merge remote-tracking branch 'refs/remotes/origin/master' 1 year ago
Amrsatrio 19177e4f72 ep_taskbar: Hook context menu functions 1 year ago
Amrsatrio 214ad2bd18 Version: 22621.3880.66.2 (pre-release) 1 year ago
Amrsatrio 48c2a7551e Build: Disable bundling of ep_taskbar for now 1 year ago
Amrsatrio a9b089a86a Taskbar10: Reworked `ImmersiveColor.h`'s referencing to `uxtheme.dll` private functions 1 year ago
Amrsatrio e771264a28 Merge remote-tracking branch 'origin/master' 1 year ago
Amrsatrio c69eb5f11a GUI: Increase buffer size of section names to 64 (#3461) 1 year ago
Amrsatrio 8c16a9a0d9 Updates: Re-add changes in 80592f6 1 year ago
Amrsatrio 5d0d218d38 Setup: Block ARM64 devices from running the x64 setup 1 year ago
Amrsatrio 2b9c747212 Updates: Revamped code with rich notification content and proper JSON parsing 1 year ago
Amrsatrio 4799b4bf25 Build: Updated build scripts and tools to build the ARM64 setup 1 year ago
Amrsatrio 78788ec461 Build: Fix build 1 year ago
Amrsatrio 57f63ad56f Work on ARM64 shell extension support 1 year ago
Amrsatrio c9884b2ba3 Update ep_dwm for ARM64 support 1 year ago
Amrsatrio b76c0e420f GUI: Fix build 1 year ago
Amrsatrio 2e4e4f5f2b Taskbar10: Add remaining important patterns for ARM64 1 year ago
Amrsatrio 992b3a60cd All: Preliminary ARM64 support 1 year ago
Amrsatrio 016214a381 L10N: Fix compile 1 year ago
Amrsatrio 51f06243e6 Version: 22621.3810.66.1 1 year ago
Amrsatrio 0b86e55059 Build: Include ep_taskbar in official builds ^2 1 year ago
Amrsatrio 146070da76 Build: Include ep_taskbar in official builds 1 year ago
Amrsatrio 9844324b5e Symbols: Update explorer.exe symbols reading for 26244+ 1 year ago
Amrsatrio 62dcb98cb2 Taskbar10: Use uxtheme.dll's immersive color functions 1 year ago
Amr Satrio 61c984fec1
Build: Update deprecated stuff (#3431) 1 year ago
Valentin Radu 6f6666b527 Version: 22621.3527.65.5 2 years ago
Valentin Radu 2112a18876 Weather: Removed `slim_appbar` element 2 years ago
Valentin Radu 57b44d2355 Weather: Fixed alignment 2 years ago
Valentin Radu 3a9fe99c95 Version: 22621.3527.65.4 2 years ago
Valentin Radu 4794713603 GUI: Maintenance section 2 years ago
Valentin Radu 80592f666d Updates: Support for ep_make 2 years ago
Valentin Radu c41b93b6b4 ep_setup_patch: Supply custom hash as argument 1 (useful in `ep_make`) 2 years ago
Valentin Radu 5ed503e451 ep_gui: Removed unnecessary dependencies 2 years ago
Amrsatrio d398195298 Version: 22621.3527.65.3 2 years ago
Amrsatrio 6d22947e36 All: Updated patterns used when symbols are not available to work with 22635.3430+ and 24H2 2 years ago
Amrsatrio c245b8f0b3 Version: 22621.3527.65.2 2 years ago
Amrsatrio d11445afda Start10: Fixed user tile menu not working on later 22H2/23H2 builds and 24H2 2 years ago
Amrsatrio 097666676a Start10: Remove the need to CoInitialize() in PatchStartTileData() 2 years ago
Amrsatrio bae9fd612d Fix crashes on 22631 caused by forgetting to call CoUninitialize() in PatchStartTileData() 2 years ago
Amrsatrio 31f1b6db0e Version: 22621.3527.65.1 2 years ago
Amrsatrio e59c34c06e Start10: Revert 45bd735 to pin down antivirus detections 2 years ago
Amrsatrio 232fe6b148 Start10: Fix Pin to Start yet again by replacing the implementation of the verb with our own 2 years ago
Amrsatrio e57a6b0aeb Taskbar10: Say goodbye to the stock 10 taskbar implementation in explorer.exe of 26002+ 2 years ago
Amrsatrio 24e019d484 Implement restoration of Logon, Logoff, and Shutdown sounds based on code in Windows 7 explorer.exe (disabled in public builds for now). 2 years ago
Valentin Radu 47cc16552b Version: 22621.3296.64.3 2 years ago
Valentin Radu 45bd735856 Start10: Prevent menu closing delay when patching standalone (without ExplorerPatcher injecting `explorer.exe`) 2 years ago
Amrsatrio c286ab5610 Start10: Tweaked the method for restoring the old start menu's animations to work with 226xx.3420+ and 24H2 (#3066) 2 years ago
Amrsatrio 5e25663c87 Start10: Revised the method for enabling the old start menu to work with 226xx.3420+ and 24H2 (#3066) 2 years ago
Amrsatrio 699ef06734 Version: 22621.3296.64.2 2 years ago
Amrsatrio 52cd4f0072 Utility: Optimized FindPattern inlining 2 years ago
Amrsatrio 913b2d03db Taskbar10: Revised the method for disabling DisableWin10Taskbar (sorry) 2 years ago
Amrsatrio 9e9c016733 Version: 22621.3296.64.1 2 years ago
Amrsatrio bdc0212d92 Update libvalinet 2 years ago
Amrsatrio ecf3ea9d54 Version: 22621.3235.64.1 2 years ago
Amrsatrio 623eceedd0 Taskbar10: Adjusted the conditions for the hotkey registration patch 2 years ago
Amrsatrio 0589a251c1 Setup: Moved uninstallation prompt dialog existence check to the GUI 2 years ago
Amrsatrio 95ea9e740b Main: Prevent injection in safe mode (#2968) 2 years ago
Amrsatrio 5e7bad22cd Taskbar10: Revised the method for restoring acrylic to the Windows 10 taskbar on 22621+ 2 years ago
Amrsatrio 5c35f5862f Taskbar10: Fixed a bug where SCOOBE would repeatedly crash Explorer when Language Switcher is set to anything other than Windows 11 (the default) ^2 2 years ago
Amrsatrio fe7f8005fb Taskbar10: Fixed a bug where SCOOBE would repeatedly crash Explorer when Language Switcher is set to anything other than Windows 11 (the default) 2 years ago
Amrsatrio fc61884c83 GUI: Add option for ep_taskbar tray overflow style 2 years ago
Amrsatrio 0791bd7ccf Taskbar10: Properly patch pnidui.dll in EP's Program Files 2 years ago
Amrsatrio 8f84a965a6 Taskbar10: Proper NeedsRo_PositionStartMenuForMonitor fix for 22621.2792+ (without relying on disabling a feature flag) 2 years ago
Amrsatrio a0885c6494 Taskbar11: Updated the IME context menu patch to work with 26058 2 years ago
Amrsatrio 91aaa82767 Version: 22621.3007.63.4 2 years ago
Amrsatrio fdc357b23f Setup: Reverted the method for ending explorer.exe and its subprocesses 2 years ago
Amrsatrio cb3f9670d9 Build: Support for enabling WITH_ALT_TASKBAR_IMPL 2 years ago
Amrsatrio 1517de005e Version: 22621.3007.63.3 2 years ago
Amrsatrio 9f9acfc74e Taskbar10: Turn off the code for loading the reimplemented taskbar on public builds for now 2 years ago
Amrsatrio 08dec82aec Setup: Slight fix in ProcessTaskbarDlls 2 years ago
Amrsatrio dfe340d2f8 Taskbar10: Various fixes for 26052+ support 2 years ago
Amrsatrio 438eb1d443 Setup: Remove OwnerWindowWndProc that I forgot to remove 2 years ago
Amrsatrio fb28688bb8 Update CHANGELOG.md 2 years ago
Amrsatrio 610ba7f919 Setup: Don't place wincorlib.dll on Windows 10 (#2829) 2 years ago
Amrsatrio 399324131d Version: 22621.3007.63.2 2 years ago
Amrsatrio 22d9e3c6ac Taskbar10: Improved animation performance when centering and/or EP Weather is not enabled, also fixed search box positioning on small taskbar size 2 years ago
Amrsatrio 35e31b91e2 Update CHANGELOG.md 2 years ago
Amrsatrio 13dc90cfcd Update README.md 2 years ago
Amrsatrio 90666d5723 Update changelog and localizations 2 years ago
Amrsatrio 36ebe5a7e5 All: Last minute fixes 2 years ago
Amr Satrio 88212b32c3
Merge pull request #2780 from Anixx/patch-1 2 years ago
Amrsatrio 3a882c7745 Build: Upgrade PlatformToolset to Visual Studio 2022 (v143) 2 years ago
Amrsatrio 982fe56eb3 Version: 22621.3007.63.1 (pre-release) 2 years ago
Amrsatrio d4f36622c5 All: Update copyright year 2 years ago
Amrsatrio 30eb7b2bb0 GUI: Add notice regarding reimplemented taskbar 2 years ago
Amrsatrio 3c8809eaa8 All: Add stuff for supporting 25xxx+ 2 years ago
Amrsatrio 0c5021b376 GUI: Added "Uninstall" section containing a button to launch the uninstaller. 2 years ago
Amrsatrio 0157ecc330 Taskbar10: Allow search box (without highlights) on Windows 11 2 years ago
Amrsatrio 1f2e2c4821 Symbols: Add `explorer.exe` symbols and unified the method for Windows 10 Alt+Tab on 22000 2 years ago
Amrsatrio 79b0f68aff Start10: Removed the original method for fixing Jump List (right click) views 2 years ago
Amrsatrio 97fd4831a8 Taskbar10: Instant Network and Battery flyouts on versions that don't need them 2 years ago
Amrsatrio e0b97e2be6 File Explorer: Proper pixel-perfect address bar shrinking 2 years ago
Amrsatrio 296c6a0fed Setup: Cleaner uninstallation and cleaner code. 2 years ago
Anixx 61d9715439
Update dllmain.c 2 years ago
Amrsatrio 8c1fc0e499 Taskbar10: Made flyout positioning patches work with 26020.1000 2 years ago
Amrsatrio 026f81695f Build: Add trailing backslashes to OutDir to fix warnings 2 years ago
Amrsatrio 1939de5e97 Taskbar10: Made flyout positioning patches work with 22635.3066 2 years ago
Amrsatrio 6779365927 README: Moved important information back from the Wiki to the README. 2 years ago
Amrsatrio 9b68cc0635 Taskbar10: Revised the pattern for patching the new IME context menu so that it works on 25951 ^2 2 years ago
Amrsatrio 702b2a76d9 Version: 22621.2861.62.2 2 years ago
Amrsatrio 4bea5f688d Taskbar10: Revised the pattern for patching the new IME context menu so that it works on 25951 2 years ago
Amrsatrio ce9f973167 Symbols: Fixed languages with longer strings such as French crashing Explorer when attempting to download symbols 2 years ago
Amrsatrio 9444eee9be L10N: Update translations 2 years ago
Amrsatrio ee06d36c57 Version: 22621.2861.62.1 2 years ago
Amrsatrio 3a1b8b8296 File Explorer: Fixed crashes when using Windows 7/10 control interface on OS builds 22635.2915+ 2 years ago
Amrsatrio bff76da2bf Taskbar10: Disable the 42537950 feature flag that is present on Canary builds 2 years ago
Amrsatrio 3c0b4a9b72 GUI: Increased window width for all languages (#2574) 2 years ago
Amrsatrio ec68783677 Taskbar10: Various *important* fixes: 2 years ago
Amrsatrio a7a3d2727c L10N: Fixed a little bug in EP_L10N_ApplyPreferredLanguageForCurrentThread 2 years ago
Amrsatrio 72f1458afe Improved method of disabling immersive menus for proper rendering of submenus 2 years ago
Amrsatrio 0ad150a325 Improved twinui.pcshell.dll patterns to be more versatile 2 years ago
Amrsatrio 7c3be29282 GUI: Added the ability to switch languages 2 years ago
Amrsatrio 3cb3ace48a Made FindPattern a non-inline function. 2 years ago
Amrsatrio 2450a5d284 Main: Fixed signature of ApplyOwnerDrawToMenu and RemoveOwnerDrawFromMenu 2 years ago
Amrsatrio 9e7c1e68b7 Symbols: Fixed SymbolsLastNotifiedOSBuild registry value not being written 2 years ago
Amrsatrio 7d0cdde356 Taskbar10: Fixed start menu/search flyout positioning code crashing Explorer when the display resolution changes 2 years ago
Amrsatrio d6cdb5d8ed All: Added option to enable UI sounds on `explorer.exe`'s XAML views 2 years ago
Amrsatrio 3b902d0ae7 File Explorer: Fixed UB caused by wrong ShouldAppsUseDarkMode signature (#2429, #2431) 2 years ago
Amrsatrio c5bb636f1e All: Updated donation links, with kind permission from @valinet 2 years ago
Amrsatrio a0f9c0c7dc Version: 22621.2506.60.1 (Pre-release) 2 years ago
Amrsatrio f62c53253c File Explorer: Restored "Apply Mica" functionality on 22H2 2 years ago
Amrsatrio 2dc1340207 File Explorer: Added option to disable the modern navigation bar (FEMNB). 2 years ago
Amrsatrio b45f79f25d Setup: Reorganized resources 2 years ago
Amrsatrio 163b45228a L10N: Localized Setup 2 years ago
Amrsatrio fc17455962 L10N: Localized remaining user-facing texts in GUI and Updates 2 years ago
Amrsatrio b5b0b21443 L10N: Localized Updates and Symbols notifications 2 years ago
Amrsatrio a74f27b42d GUI: Change PlatformToolset to v142 to align with others 2 years ago
Amrsatrio 639d7aa5f1 GUI: Decoupled into ep_gui and added support for localization 2 years ago
Amrsatrio f6f6d899f2 GUI: Begin decoupling into ep_gui 2 years ago
Amrsatrio ac268b1acb Taskbar10: Partially fixed Windows 11 Start menu and Search positioning on builds 23545+ (Dev) 2 years ago
Amrsatrio a7c87ce37d Setup: Fixed uninstallation of EP installations that have went through upgrades before the proper Pin to Start fix ^2 2 years ago
Amrsatrio 845d2b55c9 Setup: Fixed uninstallation of EP installations that have went through upgrades before the proper Pin to Start fix 2 years ago
Amrsatrio bdc06de667 Taskbar10: Don't register the Win+X window more than once (thanks @roflcopter4) 2 years ago
Amrsatrio af3bff4b9f Update README.md 2 years ago
Amrsatrio a77aff4b29 Taskbar10: Pulled back 2cc87ab 2 years ago
Amrsatrio 4999f1d520 Version: 22621.2428.59.1 (Pre-release) 2 years ago
Amrsatrio 5321766d4e Start10: Add RefreshedStyles.xbf 2 years ago
Amrsatrio 2cc87aba39 Taskbar10: Fixed a bug where the Windows 10 taskbar no longer shows after a certain configuration update in 23560.1000 2 years ago
Amrsatrio 11160c804d GUI: Fixed a bug where "Remember last used section" doesn't remember the current page after being enabled 2 years ago
Amrsatrio 655e62c364 Start10: Fixed a bug where certain localizable texts stayed in English 2 years ago
aubymori 8fc53a1285 Accurate taskbar fonts for classic theme mitigations 2 years ago
Amrsatrio 67b7a27044 Start10: Attempt to fix exploding RAM usage when opening Start10 on 22621.2134+ 2 years ago
Amrsatrio f027a36837 All: Prepared some headers for C++ 2 years ago
Amrsatrio a57471feb2 Taskbar10: Fix start menu position when the taskbar is at the left or right side on Moment 4 builds 2 years ago
Amrsatrio 7e2f76840a Start10: Properly fix start menu showing/hiding along with its original animations on builds 22000.65+ 2 years ago
Amrsatrio 80f11ae4f9 Symbols: Remove unneeded setting the keys to 0 because the tree is deleted anyway if the hash does not match 2 years ago
Amrsatrio acc0131e77 All: Disabled hooks on processes other than Explorer 2 years ago
Amrsatrio 8412bd64d9 Symbols: Reworked the symbol manager so that symbols don't need to be successfully downloaded in succession 2 years ago
Amrsatrio b52bd790ed Taskbar10: Fixed `PatchExplorer_UpdateWindowAccentProperties` to not crash anymore with build 25951 (Canary) 2 years ago
Amrsatrio dca0b3ae44 Taskbar10: Made the Control Center and Toast Center positioning patch work with build 25951 (Canary) 2 years ago
Amrsatrio b157abad62 Version: 22621.2361.58.4 2 years ago
Amrsatrio 4ee742f116 Taskbar10: Disabled the patch for proper acrylic background on Canary builds 2 years ago
Amrsatrio bdd71efeb9 Start: Indicate that "Start menu style" requires restart so that Explorer tile pinning works properly. 2 years ago
Amrsatrio 9f04110d72 Taskbar11: Restored commit 085b3dd that I modified by accident 2 years ago
Amrsatrio 0b57e78d18 Version: 22621.2361.58.3 2 years ago
Amrsatrio 3b38b94df2 Build: Revert PlatformToolset to v142 2 years ago
Amrsatrio 21c288c3c0 Start10: The Pin to Start/Unpin from Start patch should not run when the Windows 11 start menu is used 2 years ago
Amrsatrio 29fda7935d Start10: Revised the method of fixing Pin to Start/Unpin from Start 2 years ago
Amrsatrio dca4057654 Start10: Restored the Start_ShowClassicMode registry query that I accidentally removed 2 years ago
Amrsatrio 15c07a0530 Start10: Implemented proper fix for Pin to Start/Unpin from Start 2 years ago
Amrsatrio a4f5bd0ceb Start10: Fixed non-UWP apps disappearing on Dev channel builds 23545+ 2 years ago
Amrsatrio 89b2f3f8cf Start10: Fix AddUserPinnedShortcutToStart hook 2 years ago
Amrsatrio ce7e170ee1 Build: Add ExplorerPatcher\packages.config 2 years ago
Amrsatrio 001e8d8d1d FIle Explorer: Fix Pin to Start/Unpin from Start from Explorer and fix command bar option not being applied to non-primary Explorer instances 2 years ago
Valentin Radu fbaad56b22 Version: 22621.2361.58.2 2 years ago
Valentin Radu 085b3dd9f7 Taskbar11: Fixed a bug that reset the "never combine" setting on OS builds 22621.2361+ 2 years ago
Amrsatrio 070639360d Taskbar10: Fix Wi-Fi flyout buttons on 22621 builds 2 years ago
Amrsatrio 148e398b8c Start10: Made `SyncSettingsFromRegToCDS()` to only run when the old start menu is enabled 2 years ago
Amrsatrio e28940d6a1 Start10: Fix start menu folders, show recently added, and show frequently used apps settings not being applied on 22621.2134+ 2 years ago
Amrsatrio 4ece80c8cb All: Try to find `twinui.pcshell.dll` offsets from disk instead of from memory for compatibility with other tweak software 2 years ago
Amrsatrio b09482f1b2 Update README.md 2 years ago
Amrsatrio 05611dd29c Version: 22621.2361.58.1 2 years ago
Amrsatrio 1977d78ba0 Taskbar10: Fix pen menu crashing `explorer.exe` on 22621.2134+ 2 years ago
Valentin Radu cdead1b18a libvalinet: Upgraded to latest version which fixes VnGetUBR 2 years ago
Amrsatrio b426d2c46a File Explorer: Try to avoid crashes related to the new Windows App SDK views 2 years ago
Amrsatrio 6023718b95 Taskbar11: Fixed a bug that crashed `explorer.exe` when right clicking the new taskbar on Windows 11 builds with "Never combine" on the new taskbar 2 years ago
Amrsatrio bc3bbc7e5e Taskbar10: Fixed Windows 10 taskbar not showing up on Windows 11 builds with "Never combine" on the new taskbar 2 years ago
Amrsatrio 40d63f1ef8 Version: 22621.2283.57.2 2 years ago
Amrsatrio dfee1aee37 All: Fixed a bug that crashed `explorer` on OS builds lower than 22621 (Windows 11 22H2) 2 years ago
KabanFriends 2607f9ab05 Fix typo in ep_extra/README.md 2 years ago
Valentin Radu a7b29c5409 Version: 22621.2283.57.1 2 years ago
Valentin Radu fe78dcaa24 Taskbar11: Fixed a bug that crashed `explorer.exe` when right clicking the taskbar on OS builds 22621.2134 and newer 2 years ago
Amrsatrio 5f2b545748 Symbols: Added patterns for `twinui.pcshell.dll` as a backup when symbols are not available 2 years ago
Amrsatrio 96e93b7331 Taskbar10: Improved patterns of Moment 2 patches to make them work with 23545.1000 Beta 2 years ago
Amrsatrio 1115643206 Taskbar10: Improved patterns of Moment 2 patches to make them work with 22621.2359 Release Preview 2 years ago
Amrsatrio b76d62e073 Taskbar10: Fixed grammar in Moment2PatchTaskView explanation 2 years ago
Amrsatrio cd7396e8a0 Taskbar10: Revised the method of patching Task View so that it works on 22621.2134 2 years ago
Amrsatrio 82556f08e6 Taskbar10: Fix new IME context menu on 22H2 2 years ago
Amrsatrio 3be4aabdb5 Taskbar10: Fix Win+A and Win+N on 22621.2134+ 2 years ago
Amrsatrio e9945d115b Taskbar10: Fix volume and brightness popups on 22621.2134+ 2 years ago
Amrsatrio 765f6ceb9c Taskbar10: Added missing info in patch explanation 2 years ago
Amrsatrio db1a168ebf Taskbar10: Try to make fixes for 22621.2134. 2 years ago
Valentin Radu 5bda71f184 Version: 22621.1992.56.3 2 years ago
Valentin Radu 2e43c679b9 Taskbar10: Correct centering of taskbar items when search box is enabled in Windows 10 2 years ago
Valentin Radu cfd53c9f2b Version: 22621.1992.56.2 2 years ago
Valentin Radu 275a91f0d9 Start10: Fixed a bug that prevented centering on Windows 10 2 years ago
Valentin Radu 53ff541d78 Version: 22621.1992.56.1 2 years ago
Valentin Radu 46c504172c Start10: Fixed a bug that prevented the menu from working on OS builds 22621.1413 and newer 2 years ago
Valentin Radu 6fb998eb75 Version: 22621.1555.55.2 3 years ago
Valentin Radu a95a6881cc Version: 22621.1555.55.1 3 years ago
Valentin Radu 968d969df6 Weather: Fixed widget failing to load when using the Microsoft icon pack 3 years ago
Valentin Radu 0344a5e156 Version: 22621.1413.54.5 3 years ago
Valentin Radu 6bc2ea5d2b All: Fix crash when attempting to hook function on older OS builds 3 years ago
Valentin Radu 8e9403cfb5 Version: 22621.1413.54.4 3 years ago
Valentin Radu 5649a83739 Start11: Fixed a bug that prevented the menu from working when the setting "Disable Recommended section" is used and the display scaling is 125% 3 years ago
Valentin Radu 4e55feefc3 Version: 22621.1413.54.3 3 years ago
Valentin Radu 27a8fd9a6b Start11: Better enforcement for disabling the "Recommended" section 3 years ago
Valentin Radu 0de81fdc68 Resources: Updated copyright info 3 years ago
Valentin Radu a5e5287954 Weather: Fixed a bug that prevented the widget from displaying correctly 3 years ago
Valentin Radu 8b5443d59b Version: 22621.1413.54.1 3 years ago
Valentin Radu 2a1aad2d03 Weather: Fixed widget icons when using Microsoft icon pack 3 years ago
Valentin Radu 1738b45866 Setup: `explorer` will restart using the token it was running under before starting application maintenance 3 years ago
Valentin Radu d7e5b7d3c9 All: Implemented a mechanism to stop repeated crashes 3 years ago
Valentin Radu 0ad140c47f Taskbar10: Disable tablet optimized taskbar feature 3 years ago
Valentin Radu 23a4190018 All: Infrastructure for reporting which OS features are enabled 3 years ago
Valentin Radu 4f3dab5a5c Version: 22621.1344.53.1 3 years ago
Valentin Radu f9d702ebbf Taskbar10: Fixed a bug that crashed `explorer` on OS build 22621.1344 3 years ago
Valentin Radu cc0af464c3 Weather: Fixed a bug that displayed the widget area using a different background color 3 years ago
Valentin Radu c083327e2f Weather: Fixed a bug that might throw a script error when certain elements are not ready 3 years ago
Valentin Radu a8c7fbadaa Weather: Fixed a bug that could prevent the widget from properly loading 3 years ago
Valentin Radu ca8ce137d8 ep_extra: Implemented a loadable module for Windows 7's Alt-Tab 3 years ago
Valentin Radu 1f4b586f03 ep_extra: Implemented an `ep_extra`-based loader 3 years ago
Valentin Radu 7c4567ac79 Version: 22621.819.52.2 3 years ago
Valentin Radu 9f9d43e103 Start11: Fix "Disable recommended section" to work at 125% display scaling 3 years ago
Valentin Radu 02cb6e900c Version: 22621.819.52.1 3 years ago
Valentin Radu 451db3c5b6 Taskbar11: Option to use the stock taskbar context menu 3 years ago
Valentin Radu 53fad19901 Start: Better way to determine the monitor on which the Start menu will open 3 years ago
Valentin Radu 4212e357b7 Start11: Center menu on screen also works when taskbar is not at the bottom 3 years ago
Valentin Radu d262c41850 Version: 22621.608.51.6 3 years ago
Valentin Radu d7a038564b All: Protect against crashes caused by failure to patch the IAT 3 years ago
Valentin Radu 6190fd2278 Version: 22621.608.51.5 3 years ago
Valentin Radu 2572a802db Start11: Respect "Layout" settings on 22621-based builds 3 years ago
Valentin Radu 5048a4f76f Version: 22621.608.51.4 3 years ago
Valentin Radu a6a88b1b87 Taskbar11: Fixed a bug that could crash `explorer.exe` when right clicking certain system tray icons on 22621-based builds 3 years ago
Valentin Radu 3717aefdaa Version: 22621.608.51.3 3 years ago
Valentin Radu 5cef3b12c3 GUI: Expose sws scroll wheel behavior option 3 years ago
Valentin Radu 9d64a8c3a5 sws: Fixed a bug that could prevent correct reload of settings when entries were deleted from the registry 3 years ago
Valentin Radu f285371de0 Version: 22621.608.51.2 3 years ago
Valentin Radu d4cae8106b All: Fix taskbar cascade and tile windows options 3 years ago
Valentin Radu 3fe00cb138 sws: Support for changing selection in window list using the mouse wheel 3 years ago
Valentin Radu e4e3c61ade Version: 22621.608.51.1 3 years ago
Valentin Radu 0833f513f8 General: Fix network and battery flyouts on OS build 22621 3 years ago
Valentin Radu 556aeb5aae General: Fixed a bug that could prevent the battery or network flyouts from showing 3 years ago
Valentin Radu 33d1518977 General: Support EP as version 22621 3 years ago
Valentin Radu 4cfc2cea4b Updates: Check remote hash against locally computed hash 3 years ago
Valentin Radu 50f3a709c0 Weather: Fixed wrong left padding of the widget 3 years ago
Valentin Radu fe071230ab Version: 22622.450.50.3 3 years ago
Valentin Radu 35046cd91a ep_dwm: Fixed use-after-free bug; fixed incorrect check for running dwm instances 3 years ago
Valentin Radu 5de2eb0044 Version: 22622.450.50.2 3 years ago
Valentin Radu d55f3c73c9 GUI: Support disabling File Explorer modern search bar in 32-bit applications 3 years ago
Valentin Radu 8fd7c46db0 All: Substitute `RegDeleteKeyW` with `RegDeleteTreeW` 3 years ago
Valentin Radu ddeaa2e538 Main: Fix typo 3 years ago
Valentin Radu 9fe862ed38 Version: 22622.450.50.1 3 years ago
Valentin Radu 0c2f287d57 GUI, Main: Support for File Explorer - Control interface setting on OS builds 22621+ 3 years ago
Valentin Radu c96aebee11 Explorer: Option to shrink address bar height (thanks @krlvm) 3 years ago
Valentin Radu a3cd2a33a9 GUI: Show Widgets button toggle for Taskbar11 on OS builds 22621+ 3 years ago
Valentin Radu 0a42d5559f Taskbar11: Fix right click menu and double click to auto-hide on OS builds 22621+ 3 years ago
Valentin Radu 25660c908a GUI, Main: Disable non-functional Snap Assist style option on OS builds 22621+ 3 years ago
Valentin Radu cb951df606 Alt-Tab: Enable Windows 10 style in OS builds 22621+ 3 years ago
Valentin Radu 7d6b0933e1 ep_dwm: Compatibility with OS builds 22621+ 3 years ago
Valentin Radu 7b7cf6195d Taskbar10: Fix redraw problem on OS builds 22621+ 3 years ago
Valentin Radu 5ee6e3508d Main: Fixed a bug that crashed explorer at PC startup on OS builds 22621+ 3 years ago
Valentin Radu 619d9caf21 GUI: Fixed a bug that crashed when displaying the File Explorer section on older builds 3 years ago
Valentin Radu aeeb362045 HideExplorerSearchBar: Fixed on OS builds 22621+ 3 years ago
Valentin Radu a90439d096 Main: Fix Windows Spotlight integration on OS builds 22621+ 3 years ago
Valentin Radu 92a3da12c0 GUI: Remove Other - Show Command Prompt instead of PowerShell in Win+X menu 3 years ago
Valentin Radu 258d35c4a0 GUI: Fix language switcher on OS builds 22621+ 3 years ago
Valentin Radu de44754c42 Main: Fixed a bug that crashed Explorer when a folder window was opened after a first one was closed on OS builds 22621+ 3 years ago
Valentin Radu aa922410f4 GUI: Hide File Explorer - title bar related options on OS builds 22621+ 3 years ago
Valentin Radu 6feeba1cd1 GUI: Hide File Explorer - Control interface setting on OS builds 22621+ 3 years ago
Valentin Radu baecdcc191 GUI: Enable search button in Windows 10 taskbar by default on OS builds 22621+ 3 years ago
Valentin Radu ce6fb8d8f9 GUI: Hide Taskbar - Location in Windows 11 style on OS builds 22621+ 3 years ago
Valentin Radu 2e7a175537 GUI: Mark Taskbar - Start button style as requiring a restart 3 years ago
Valentin Radu 9239e56172 GUI: Hide Cortana button options on OS builds 22621+ 3 years ago
Valentin Radu 092edc10be Version: 22000.795.48.2 3 years ago
Valentin Radu 9ec44832dd Weather: Fixed a bug that could hang the host process and explorer 3 years ago
Valentin Radu 1c31c1c281 Weather: Free widget from a single place 3 years ago
Valentin Radu 953a984353 Version: 22000.795.48.1 3 years ago
Valentin Radu 7c1cb3d560 Weather: Do not display error page when network connectivity is lost; instead, keep showing cached data from last refresh 3 years ago
Valentin Radu da3fece8cd Weather: Wait a bit before refreshing when network connectivity is restored 3 years ago
Valentin Radu aeb8e54b58 Weather: Detect and break infinite loops on navigating to the error page 3 years ago
Valentin Radu f7ffaca146 Version: 22000.708.47.2 3 years ago
Valentin Radu 81d804ab06 General: Fixed a system high DPI-related bug that caused wide Windows 10 taskbar buttons and incorrect (desktop) icon spacing 3 years ago
Valentin Radu 0ff6b1b365 Version: 22000.708.47.1 3 years ago
Valentin Radu 1cea91694f Symbols: Built-in support for OS build 22000.778 3 years ago
Valentin Radu e988bbb08f General: Fixed a bug that had the Start button context menu / Win-X menu / power user menu fail to display and potentially lock the shell on OS builds 22000.778+ and 22621+ 3 years ago
Valentin Radu d042e57ae4 Version: 22000.708.46.6 4 years ago
Valentin Radu 932f826ecb GUI: Fix a bug that had the window fail to display some sections under default settings 4 years ago
Valentin Radu ae403668f6 Version: 22000.708.46.5 4 years ago
Valentin Radu 961cc11dda Weather: Fixed a bug that prevented the widget from working when WebView2 Runtime >= 102.0.1245.33 4 years ago
Valentin Radu 552a2e2040 General: Fixed a bug that could prevent Control Panel link redirection from working correctly 4 years ago
Valentin Radu c1f9f49f37 Version: 22000.708.46.4 4 years ago
Valentin Radu dbdc1b80f8 Weather: Show "Reload" link when data fails to load 4 years ago
Valentin Radu 5093e7de37 Weather: Fix and free event registration tokens 4 years ago
Valentin Radu 7deb97e510 sws: Sync with upstream 4 years ago
Valentin Radu 9a7d2de43b Spotlight: Harden desktop window detection 4 years ago
Valentin Radu 9bf60309c0 General: Export variable that tells if desktop is in foreground 4 years ago
Valentin Radu 6bd514ba13 Version: 22000.708.46.3 4 years ago
Valentin Radu c8bed99c1a Taskbar10: Option to hide the "Show desktop" button 4 years ago
Valentin Radu 434cdbdd46 Start10: Fixed a bug in Windows 10 where the Start menu was centered by default 4 years ago
Valentin Radu a713d3964e Version: 22000.708.46.2 4 years ago
Valentin Radu cf4700af6f sws: Fixed a bug that created unnecessary paint events when a window was flashing and the switcher is not shown 4 years ago
Valentin Radu 87a2638fb1 Spotlight: Fixed a bug that had Spotlight context menu entries appear in some menus other than the desktop context menu 4 years ago
Valentin Radu 26058f332d Version: 22000.708.46.1 4 years ago
Valentin Radu b809e9e8ed GUI: Support switching more pages using the number row on the keyboard 4 years ago
Valentin Radu 7649805e18 GUI: Added support for hiding pages and page contents 4 years ago
Valentin Radu d0ad8bd1e3 Spotlight: Added section, logic and configuration parameters 4 years ago
Valentin Radu 13e1cc7a1b Symbols: Built-in support for OS build 22000.708 4 years ago
Valentin Radu 9e6d13a9f1 Version: 22000.675.45.2 4 years ago
Valentin Radu d9004c1566 sws: Fixed a bug that caused the switcher to display a hung UWP app twice 4 years ago
Valentin Radu 7f76dca159 libvalinet: Fixed memory leak in toast.h 4 years ago
Valentin Radu 7596548350 Version: 22000.675.45.1 4 years ago
Valentin Radu d350b0e178 sws: Fixed #1084 4 years ago
Valentin Radu 86739da8f3 Symbols: Built-in support for OS build 22000.675 4 years ago
Valentin Radu d5f510f572 Version: 22000.613.44.2 4 years ago
Valentin Radu cd2d5c66f9 Weather: Fixed a bug that could hang or lock the shutdown/restart 4 years ago
Valentin Radu 5e17f5a817 Weather: Fixed a bug that had "COM Surrogate" display as a running 4 years ago
Valentin Radu 52e86d739a Version: 22000.613.44.1 4 years ago
Valentin Radu d828fa2137 Other: Option to disable Win+F hotkey 4 years ago
Valentin Radu 448f3ef9b7 Symbols: Built-in support for 22000.613 4 years ago
Valentin-Gabriel Radu 78b8c6edd4
Taskbar10: Fixed a bug that prevented `UndeadStartCorner` from working properly when the taskbar alignment setting was never used 4 years ago
Valentin Radu 8461f3a33d Version: 22000.556.43.4 4 years ago
Valentin Radu a2b28e5345 File Explorer: Option to enable legacy file transfer dialog 4 years ago
Valentin Radu 5da58c530f Version: 22000.556.43.3 4 years ago
Valentin Radu d071ad0db6 File Explorer: Localization for classic drive groupings 4 years ago
Valentin Radu cd96a949e8 File Explorer: Classic drive groupings do not require a restart 4 years ago
Valentin Radu 244e4a0936 File Explorer: Option to disable ribbon 4 years ago
lordmilko 3f96325ad6 File Explorer: Add support for classic drive groupings in This PC 4 years ago
Valentin Radu 21f3377a27 Version: 22000.556.43.2 4 years ago
Valentin Radu 9c364f470e Taskbar10: Fix taskbar acrylic in newer OS builds (22581+) 4 years ago
Valentin Radu 9d89ff8a93 Version: 22000.556.43.1 4 years ago
lordmilko 21c2f219d5 Other: Add support for disabling Aero Snap Quadrants on Windows 11 4 years ago
Valentin-Gabriel Radu efd52cf951
Taskbar10: Fixed inactive (for now) case 4 years ago
Valentin Radu 28fc1e58c2 Version: 22000.556.42.39 4 years ago
Valentin Radu 2ee00c2b3a Weather: Fixed bug where the widget fails to start on new installs due to ExplorerPatcher not existing in `%APPDATA%` 4 years ago
Valentin Radu b1c40fc922 Version: 22000.556.42.38 4 years ago
Valentin Radu d3bf5cca5f ep_dwm: Fixed a bug that made this not work after signing out and then back into a user account 4 years ago
  1. 120
      .github/ISSUE_TEMPLATE/bug_report.yml
  2. 14
      .github/ISSUE_TEMPLATE/config.yml
  3. 152
      .github/workflows/build.yml
  4. 12
      .gitmodules
  5. 14
      BuildDependenciesDebug.bat
  6. 14
      BuildDependenciesRelease.bat
  7. 706
      CHANGELOG.md
  8. 1
      ExplorerPatcher-L10N
  9. 76
      ExplorerPatcher.sln
  10. 17
      ExplorerPatcher/ArchiveMenu.c
  11. 24
      ExplorerPatcher/ArchiveMenu.h
  12. BIN
      ExplorerPatcher/ExplorerPatcher.rc
  13. 325
      ExplorerPatcher/ExplorerPatcher.vcxproj
  14. 76
      ExplorerPatcher/ExplorerPatcher.vcxproj.filters
  15. 15
      ExplorerPatcher/HideExplorerSearchBar.c
  16. 1
      ExplorerPatcher/HideExplorerSearchBar.h
  17. 39
      ExplorerPatcher/ImmersiveColor.h
  18. 23
      ExplorerPatcher/ImmersiveFlyouts.c
  19. 14
      ExplorerPatcher/ImmersiveFlyouts.h
  20. 198
      ExplorerPatcher/InputSwitch.cpp
  21. 125
      ExplorerPatcher/InputSwitch.h
  22. 146
      ExplorerPatcher/Localization.cpp
  23. 26
      ExplorerPatcher/Localization.h
  24. BIN
      ExplorerPatcher/RefreshedStyles.xbf
  25. 154
      ExplorerPatcher/StartMenu.c
  26. 84
      ExplorerPatcher/StartMenu.h
  27. 1337
      ExplorerPatcher/StartMenuSettings.cpp
  28. 29
      ExplorerPatcher/StartupSound.c
  29. 390
      ExplorerPatcher/StartupSound.cpp
  30. 54
      ExplorerPatcher/StartupSound.h
  31. 279
      ExplorerPatcher/Taskbar10.cpp
  32. 232
      ExplorerPatcher/TaskbarCenter.cpp
  33. 95
      ExplorerPatcher/TaskbarCenter.h
  34. 3646
      ExplorerPatcher/TwinUIPatches.cpp
  35. 10
      ExplorerPatcher/def.h
  36. 6087
      ExplorerPatcher/dllmain.c
  37. 10
      ExplorerPatcher/fmemopen.h
  38. 8
      ExplorerPatcher/getline.h
  39. 73
      ExplorerPatcher/hooking.h
  40. 86
      ExplorerPatcher/inc/ContainerPolicies.h
  41. 906
      ExplorerPatcher/inc/NativeString.h
  42. 46
      ExplorerPatcher/inc/RefCountedObject.h
  43. 29
      ExplorerPatcher/inc/ResultUtils.h
  44. 583
      ExplorerPatcher/inc/SimpleArray.h
  45. 720
      ExplorerPatcher/inc/memsafe.h
  46. 154
      ExplorerPatcher/lvt.c
  47. 10
      ExplorerPatcher/lvt.h
  48. 47
      ExplorerPatcher/osutility.h
  49. 5
      ExplorerPatcher/packages.config
  50. 16
      ExplorerPatcher/resource.h
  51. 669
      ExplorerPatcher/settings.reg
  52. 584
      ExplorerPatcher/settings10.reg
  53. 1452
      ExplorerPatcher/symbols.c
  54. 66
      ExplorerPatcher/symbols.h
  55. 1181
      ExplorerPatcher/updates.c
  56. 1437
      ExplorerPatcher/updates.cpp
  57. 32
      ExplorerPatcher/updates.h
  58. 544
      ExplorerPatcher/utility.c
  59. 677
      ExplorerPatcher/utility.h
  60. 1
      FUNDING.yml
  61. 64
      README.md
  62. 2
      ep_dwm
  63. 5
      ep_extra/README.md
  64. 100
      ep_extra/ep_extra.rc
  65. 179
      ep_extra/ep_extra.vcxproj
  66. 37
      ep_extra/ep_extra.vcxproj.filters
  67. 18
      ep_extra/main.asm
  68. 14
      ep_extra/resource.h
  69. 82
      ep_extra/worker.c
  70. 9
      ep_extra_valinet.win7alttab/README.md
  71. 100
      ep_extra_valinet.win7alttab/Resource.rc
  72. 161
      ep_extra_valinet.win7alttab/ep_extra_valinet.win7alttab.vcxproj
  73. 44
      ep_extra_valinet.win7alttab/ep_extra_valinet.win7alttab.vcxproj.filters
  74. 120
      ep_extra_valinet.win7alttab/main.c
  75. 14
      ep_extra_valinet.win7alttab/resource.h
  76. 4
      ep_generate_release_description/ep_generate_release_description.c
  77. 16
      ep_generate_release_description/ep_generate_release_description.vcxproj
  78. 16
      ep_generate_release_name/ep_generate_release_name.vcxproj
  79. 923
      ep_gui/GUI.c
  80. 27
      ep_gui/GUI.h
  81. 30
      ep_gui/dllmain.cpp
  82. 161
      ep_gui/ep_gui.vcxproj
  83. 1
      ep_gui/pch.cpp
  84. 1
      ep_gui/pch.h
  85. 387
      ep_gui/resources/EPSettingsResources.h
  86. 39
      ep_gui/resources/EPSharedResources.h
  87. 121
      ep_gui/resources/ep_gui.rc
  88. 434
      ep_gui/resources/lang/ep_gui.en-US.rc
  89. 24
      ep_gui/resources/resource.h
  90. 801
      ep_gui/resources/settings.reg
  91. 629
      ep_gui/resources/settings10.reg
  92. 1270
      ep_setup/ep_setup.c
  93. 286
      ep_setup/ep_setup.vcxproj
  94. 18
      ep_setup/resources/ep_setup.rc
  95. 18
      ep_setup/resources/ep_setup_debug.rc
  96. BIN
      ep_setup/resources/files/Windows.UI.ShellCommon/StartUI/Assets/Fonts/BitMDL2.ttf
  97. BIN
      ep_setup/resources/files/Windows.UI.ShellCommon/StartUI/Assets/Fonts/SkypeUISymbol-Regular.ttf
  98. BIN
      ep_setup/resources/files/Windows.UI.ShellCommon/StartUI/Assets/officehub150x150.png
  99. BIN
      ep_setup/resources/files/Windows.UI.ShellCommon/StartUI/Assets/officehub71x71.png
  100. BIN
      ep_setup/resources/files/Windows.UI.ShellCommon/StartUI/Assets/onenote150x150.png
  101. Some files were not shown because too many files have changed in this diff Show More

120
.github/ISSUE_TEMPLATE/bug_report.yml

@ -0,0 +1,120 @@
name: Bug report
description: Report the issue you have with ExplorerPatcher here
labels:
- bug
body:
- type: markdown
attributes:
value: |
> [!WARNING]
> Issues regarding virus detections will be closed automatically. Discuss it in [Issue #3670](https://github.com/valinet/ExplorerPatcher/issues/3670) or [Issue #3228](https://github.com/valinet/ExplorerPatcher/issues/3228)
- type: checkboxes
attributes:
label: Before reporting your issue
description: Please ensure you meet the following criteria before reporting issues
options:
- label: I have confirmed that this issue does not happen when ExplorerPatcher is not installed
- label: I do not have "register as shell extension" enabled
- label: I have tried my best to check existing issues
- type: textarea
attributes:
label: Repro ExplorerPatcher versions
description: Provide the relevant versions of ExplorerPatcher for reproduction of the issue.
placeholder: |
Example:
ExplorerPatcher 67.1
validations:
required: true
- type: textarea
attributes:
label: Repro Windows Versions
description: Provide the relevant versions for reproduction of the issue. For example, Windows version, and architecture (e.g. x64 or ARM64).
placeholder: |
Example:
Windows 11 24H2 26100.1150 ARM64
Windows 11 24H2 26100.2314 ARM64
validations:
required: true
- type: textarea
attributes:
label: 3rd party tweak software installed
description: A list of 3rd Party software that may modify the shell in someway.
placeholder: |
Example:
TranslucentTB
Windhawk (with disable grouping and vertical taskbar mods)
OpenShell
Nilesoft Shell
Wallpaper Engine
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. Please try to isolate the issue to ExplorerPatcher by disabling other customization software.
placeholder: |
Example:
1. Install EP 67.1.
2. Enable Windows 10 (ExplorerPatcher) taskbar and restart Explorer.
3. Make sure Ethernet (if available) is disconnected, and then disconnect Wi-Fi.
4. Turn on Personal Hotspot (iPhone) or Mobile Hotspot (Android).
5. Connect to the Personal Hotspot.
6. Observe icon changing from No Internet to Wi-Fi signal bars.
7. Turn off Personal Hotspot.
8. Observe icon staying in Wi-Fi signal bars state instead of changing to No Internet (globe icon).
validations:
required: true
- type: textarea
attributes:
label: Expected outcome
description: Describe what you expected to happen when performing the steps above.
placeholder: |
Example:
The icon of the Network tray icon changes from Wi-Fi signal bars to globe (no Internet) icon like it was on 11 23H2, 11 22H2, and previous versions.
validations:
required: true
- type: textarea
attributes:
label: Actual outcome
description: Describe what actually happens after performing the steps above.
placeholder: |
Example:
The icon is stuck in the Wi-Fi icon state, giving false impressions that the device is still connected to Wi-Fi. The icon will stay this way until Wi-Fi/Airplane Mode is toggled, or until the device is reconnected to a Wi-Fi router.
validations:
required: true
- type: textarea
attributes:
label: Additional info
description: Provide any additional information that may help in diagnosing the issue, such as logs, error messages, or links to related issues.
placeholder: |
Example:
Windows 11 build 25236 removed pnidui.dll, leaving the restoration-from-22621 method being the only option to have this icon. However, there may be interface mismatches or API updates that caused the 22621 (22H2) pnidui.dll to behave this way on 24H2. Patches to pnidui.dll may be needed in order to fix this.
validations:
required: false
- type: textarea
id: crashdumps
attributes:
label: Crash Dumps
description: In case of crashes, if possible, please upload the latest crash dumps relating to explorer.exe. Crash dumps can be found in %LOCALAPPDATA%\CrashDumps.
placeholder: Drop or paste crash dumps to upload.
validations:
required: false
- type: textarea
id: screenshots
attributes:
label: Media
description: Add screenshots/videos to help illustrate the issue
placeholder: Drop or paste images or videos to upload.
validations:
required: false

14
.github/ISSUE_TEMPLATE/config.yml

@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Questions
about: Ask questions and receive support here
url: https://github.com/valinet/ExplorerPatcher/discussions/categories/q-a
- name: Feature requests
about: Suggestions for new features and enhancements here
url: https://github.com/valinet/ExplorerPatcher/discussions/categories/ideas
- name: Showcase
about: Show off your system or give tips and tricks here
url: https://github.com/valinet/ExplorerPatcher/discussions/categories/show-and-tell
- name: Wiki
about: Useful documentation on ExplorerPatcher
url: https://github.com/valinet/ExplorerPatcher/wiki

152
.github/workflows/build.yml

@ -35,7 +35,7 @@ env:
jobs: jobs:
build: build:
runs-on: windows-latest runs-on: windows-2025
steps: steps:
- name: Print inputs - name: Print inputs
@ -46,27 +46,29 @@ jobs:
echo "build_dir: ${{ github.event.inputs.build_dir }}" echo "build_dir: ${{ github.event.inputs.build_dir }}"
- name: Checkout latest build and submodules - name: Checkout latest build and submodules
uses: actions/checkout@v2 uses: actions/checkout@v4
if: github.event.inputs.ref == '' if: github.event.inputs.ref == ''
with: with:
submodules: recursive submodules: recursive
persist-credentials: false
- name: Checkout specific build and submodules - name: Checkout specific build and submodules
uses: actions/checkout@v2 uses: actions/checkout@v4
if: github.event.inputs.ref != '' if: github.event.inputs.ref != ''
with: with:
ref: ${{ github.event.inputs.ref }} ref: ${{ github.event.inputs.ref }}
submodules: recursive submodules: recursive
persist-credentials: false
- name: Add MSBuild to PATH - name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2 uses: microsoft/setup-msbuild@v2
- name: Declare some variables - name: Declare some variables
id: vars id: vars
shell: bash shell: bash
run: | run: |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Enable SimpleWindowSwitcher support for newer Windows SDKs - name: Enable SimpleWindowSwitcher support for newer Windows SDKs
shell: cmd shell: cmd
@ -80,21 +82,43 @@ jobs:
exit /b 0 exit /b 0
- name: Setup NuGet - name: Setup NuGet
uses: nuget/setup-nuget@v1 uses: nuget/setup-nuget@v2
- name: Restore NuGet packages - name: Restore NuGet packages
run: | run: |
nuget restore ExplorerPatcher.sln nuget restore ExplorerPatcher.sln
- name: Build funchook - name: Build dependencies
shell: powershell shell: cmd
run: |
BuildDependencies%BUILD_CONFIGURATION%.bat
- name: Download ep_taskbar
uses: robinraju/release-downloader@v1
with:
repository: ExplorerPatcher/ep_taskbar_releases
fileName: ep_taskbar.*.dll
latest: true
out-file-path: build/Release
# build/Release/ep_taskbar.*.amd64.dll -> build/Release/x64/ep_taskbar.*.dll
# build/Release/ep_taskbar.*.arm64.dll -> build/Release/ARM64/ep_taskbar.*.dll
- name: Move ep_taskbar
shell: bash
run: | run: |
cd libs/funchook if ls build/Release/ep_taskbar.*.amd64.dll 1> /dev/null 2>&1; then
md build mkdir -p build/Release/x64
cd build for file in build/Release/ep_taskbar.*.amd64.dll; do
cmake -G "Visual Studio 17 2022" -A x64 .. mv "$file" "build/Release/x64/$(basename "$file" .amd64.dll).dll"
(gc .\funchook-static.vcxproj) -replace '<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>', '<RuntimeLibrary>MultiThreaded</RuntimeLibrary>' | Out-File .\funchook-static.vcxproj done
cmake --build . --config Release fi
if ls build/Release/ep_taskbar.*.arm64.dll 1> /dev/null 2>&1; then
mkdir -p build/Release/ARM64
for file in build/Release/ep_taskbar.*.arm64.dll; do
mv "$file" "build/Release/ARM64/$(basename "$file" .arm64.dll).dll"
done
fi
- name: Build EP IA-32 - name: Build EP IA-32
if: github.event.inputs.config == '' if: github.event.inputs.config == ''
@ -108,6 +132,12 @@ jobs:
run: | run: |
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=amd64 ${{env.SOLUTION_FILE_PATH}} msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=amd64 ${{env.SOLUTION_FILE_PATH}}
- name: Build EP arm64
if: github.event.inputs.config == ''
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=arm64 /p:WithArm64XBinaries=true ${{env.SOLUTION_FILE_PATH}}
- name: Build EP custom - name: Build EP custom
if: github.event.inputs.config != '' if: github.event.inputs.config != ''
working-directory: ${{env.GITHUB_WORKSPACE}} working-directory: ${{env.GITHUB_WORKSPACE}}
@ -123,88 +153,100 @@ jobs:
- name: Generate dxgi.dll - name: Generate dxgi.dll
shell: bash shell: bash
working-directory: build/Release
run: | run: |
if [[ -f "ExplorerPatcher.amd64.dll" ]]; then cp ExplorerPatcher.amd64.dll dxgi.dll; fi if [[ -f "build/Release/x64/ExplorerPatcher.amd64.dll" ]]; then cp build/Release/x64/ExplorerPatcher.amd64.dll build/Release/x64/dxgi.dll; fi
if [[ -f "build/Release/ARM64/ExplorerPatcher.arm64.dll" ]]; then cp build/Release/ARM64/ExplorerPatcher.arm64.dll build/Release/ARM64/dxgi.dll; fi
- name: Patch setup - name: Patch amd64 setup
shell: cmd shell: cmd
working-directory: build/Release
run: | run: |
ep_setup_patch.exe if exist "build\Release\x64\ExplorerPatcher.amd64.dll" (
"build\Release\x64\ep_setup_patch.exe" "build\Release\x64\ExplorerPatcher.amd64.dll" "build\Release\x64\ep_setup.exe"
)
exit /b 0 exit /b 0
- name: Patch arm64 setup
shell: cmd
run: |
if exist "build\Release\ARM64\ExplorerPatcher.arm64.dll" (
"build\Release\x64\ep_setup_patch.exe" "build\Release\ARM64\ExplorerPatcher.arm64.dll" "build\Release\ARM64\ep_setup.exe"
)
exit /b 0
- name: Delete intermediate files
shell: bash
run: |
rm -rf build/Release/x64/ep_setup_files
rm -f build/Release/x64/ep_setup_files.zip.bin
rm -rf build/Release/ARM64/ep_setup_files
rm -f build/Release/ARM64/ep_setup_files.zip.bin
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
with: with:
name: ep_bin_multi_${{ steps.vars.outputs.sha_short }}_${{ steps.vars.outputs.branch }} name: ep_bin_multi_${{ steps.vars.outputs.sha_short }}_${{ steps.vars.outputs.branch }}
path: | path: |
build/Release/ build/Release/
# build/Release/x64/ep_setup.exe -> build/Release/ep_setup.exe
# build/Release/ARM64/ep_setup.exe -> build/Release/ep_setup_arm64.exe
- name: Stage files for release
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
shell: bash
run: |
if [ -d "build/Release/x64" ] && ls build/Release/x64/ep_setup.exe 1> /dev/null 2>&1; then
cp build/Release/x64/ep_setup.exe build/Release/ep_setup.exe
fi
if [ -d "build/Release/ARM64" ] && ls build/Release/ARM64/ep_setup.exe 1> /dev/null 2>&1; then
cp build/Release/ARM64/ep_setup.exe build/Release/ep_setup_arm64.exe
fi
- name: Generate release name - name: Generate release name
shell: bash shell: bash
working-directory: build/Release working-directory: build/Release/x64
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == '' if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
run: | run: |
echo "::set-output name=data::$(./ep_generate_release_name.exe)" echo "data=$(./ep_generate_release_name.exe)" >> $GITHUB_OUTPUT
id: release_name id: release_name
- name: Generate release notes - name: Generate release notes
shell: bash shell: bash
working-directory: build/Release working-directory: build/Release/x64
if: github.ref == 'refs/heads/master' && github.event.inputs.ref == '' if: github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
run: | run: |
MY_STRING=$(./ep_generate_release_description.exe ${{ steps.vars.outputs.sha_short }} ${{ steps.vars.outputs.branch }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) echo "data<<EP_RELEASE_DESCRIPTION_DELIM" >> $GITHUB_OUTPUT
MY_STRING="${MY_STRING//'%'/'%25'}" echo "$(./ep_generate_release_description.exe ${{ steps.vars.outputs.sha_short }} ${{ steps.vars.outputs.branch }} ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_OUTPUT
MY_STRING="${MY_STRING//$'\n'/'%0A'}" echo "EP_RELEASE_DESCRIPTION_DELIM" >> $GITHUB_OUTPUT
MY_STRING="${MY_STRING//$'\r'/'%0D'}"
echo "::set-output name=data::$MY_STRING"
id: release_description id: release_description
- name: Create/update release (valinet) - name: Create/update release (valinet)
uses: actions/create-release@v1 uses: softprops/action-gh-release@v2
if: github.repository_owner == 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == '' if: github.repository_owner == 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
id: create_release id: create_release
with: with:
draft: false draft: false
prerelease: ${{ !startsWith(github.event.head_commit.message, 'rel_') }} prerelease: ${{ !startsWith(github.event.head_commit.message, 'rel_') }}
release_name: ${{ steps.release_name.outputs.data }} name: ${{ steps.release_name.outputs.data }}
tag_name: ${{ steps.release_name.outputs.data }}_${{ steps.vars.outputs.sha_short }} tag_name: ${{ steps.release_name.outputs.data }}_${{ steps.vars.outputs.sha_short }}
body: ${{ steps.release_description.outputs.data }} body: ${{ steps.release_description.outputs.data }}
env: files: |
GITHUB_TOKEN: ${{ secrets.PAT }} build/Release/ep_setup.exe
build/Release/ep_setup_arm64.exe
- name: Upload setup (valinet)
uses: actions/upload-release-asset@v1
if: github.repository_owner == 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/Release/ep_setup.exe
asset_name: ep_setup.exe
asset_content_type: application/x-msdownload
env: env:
GITHUB_TOKEN: ${{ secrets.PAT }} GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Create/update release (forks) - name: Create/update release (forks)
uses: actions/create-release@v1 uses: softprops/action-gh-release@v2
if: github.repository_owner != 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == '' if: github.repository_owner != 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
id: create_release_fork id: create_release_fork
with: with:
draft: false draft: false
prerelease: ${{ !startsWith(github.event.head_commit.message, 'rel_') }} prerelease: ${{ !startsWith(github.event.head_commit.message, 'rel_') }}
release_name: ${{ steps.release_name.outputs.data }} name: ${{ steps.release_name.outputs.data }}
tag_name: ${{ steps.release_name.outputs.data }}_${{ steps.vars.outputs.sha_short }} tag_name: ${{ steps.release_name.outputs.data }}_${{ steps.vars.outputs.sha_short }}
body: ${{ steps.release_description.outputs.data }} body: ${{ steps.release_description.outputs.data }}
env: files: |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build/Release/ep_setup.exe
build/Release/ep_setup_arm64.exe
- name: Upload setup (forks)
uses: actions/upload-release-asset@v1
if: github.repository_owner != 'valinet' && github.ref == 'refs/heads/master' && github.event.inputs.ref == ''
with:
upload_url: ${{ steps.create_release_fork.outputs.upload_url }}
asset_path: ./build/Release/ep_setup.exe
asset_name: ep_setup.exe
asset_content_type: application/x-msdownload
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

12
.gitmodules vendored

@ -1,15 +1,15 @@
[submodule "libs/libvalinet"] [submodule "libs/libvalinet"]
path = libs/libvalinet path = libs/libvalinet
url = https://github.com/valinet/libvalinet url = https://github.com/valinet/libvalinet
[submodule "libs/funchook"]
path = libs/funchook
url = https://github.com/kubo/funchook
[submodule "libs/Detours"]
path = libs/Detours
url = https://github.com/microsoft/Detours
[submodule "libs/sws"] [submodule "libs/sws"]
path = libs/sws path = libs/sws
url = https://github.com/valinet/sws url = https://github.com/valinet/sws
[submodule "libs/zlib"]
path = libs/zlib
url = https://github.com/madler/zlib
[submodule "ep_dwm"] [submodule "ep_dwm"]
path = ep_dwm path = ep_dwm
url = https://github.com/valinet/ep_dwm url = https://github.com/valinet/ep_dwm
[submodule "ExplorerPatcher-L10N"]
path = ExplorerPatcher-L10N
url = https://github.com/valinet/ExplorerPatcher-L10N

14
BuildDependenciesDebug.bat

@ -0,0 +1,14 @@
rmdir /s /q libs\zlib\build-x64
rmdir /s /q libs\zlib\build-arm64
if "%VSINSTALLDIR:~-1%"=="\" (
set "EP_VSINSTALLDIR=%VSINSTALLDIR:~0,-1%"
) else (
set "EP_VSINSTALLDIR=%VSINSTALLDIR%"
)
cmake libs/zlib -Blibs/zlib/build-x64 -G "Visual Studio 17 2022" -A x64 -D"CMAKE_GENERATOR_INSTANCE:PATH=%EP_VSINSTALLDIR%" -D"CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
cmake libs/zlib -Blibs/zlib/build-arm64 -G "Visual Studio 17 2022" -A ARM64 -D"CMAKE_GENERATOR_INSTANCE:PATH=%EP_VSINSTALLDIR%" -D"CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
cmake --build libs/zlib/build-x64 --config Debug
cmake --build libs/zlib/build-arm64 --config Debug

14
BuildDependenciesRelease.bat

@ -0,0 +1,14 @@
rmdir /s /q libs\zlib\build-x64
rmdir /s /q libs\zlib\build-arm64
if "%VSINSTALLDIR:~-1%"=="\" (
set "EP_VSINSTALLDIR=%VSINSTALLDIR:~0,-1%"
) else (
set "EP_VSINSTALLDIR=%VSINSTALLDIR%"
)
cmake libs/zlib -Blibs/zlib/build-x64 -G "Visual Studio 17 2022" -A x64 -D"CMAKE_GENERATOR_INSTANCE:PATH=%EP_VSINSTALLDIR%" -D"CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
cmake libs/zlib -Blibs/zlib/build-arm64 -G "Visual Studio 17 2022" -A ARM64 -D"CMAKE_GENERATOR_INSTANCE:PATH=%EP_VSINSTALLDIR%" -D"CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded$<$<CONFIG:Debug>:Debug>" -DCMAKE_POLICY_DEFAULT_CMP0091=NEW
cmake --build libs/zlib/build-x64 --config Release
cmake --build libs/zlib/build-arm64 --config Release

706
CHANGELOG.md

@ -2,6 +2,704 @@
This document includes the same release notes as in the [Releases](https://github.com/valinet/ExplorerPatcher/releases) section on GitHub. This document includes the same release notes as in the [Releases](https://github.com/valinet/ExplorerPatcher/releases) section on GitHub.
## 26100.4946.69
Tested on OS builds 26100.4946, 26100.5074, 26200.5751, and 26220.6682.
##### 1
* ep_weather: Fixed "Unable to load weather information" due to changes in Google's side. Thanks @davids5 for the fix! (#1334, #4351) (c3c83ff)
* Start11: Fixed hiding of Recommended Section on recent builds of 24H2. Thanks @m-wigley for the fix! (#4476) (9106226)
* GUI: File Explorer > Title bar is now available again on >= 22H2. Thanks @SandTechStuff! (583fa53)
* Reduced the occurrences of the Windows 11 bug in Explorer windows where `WM_SETTINGCHANGE` would scroll the folder items list to the top. (fa19402b)
* Changed hooking library to SlimDetours. (ff30457)
* On ARM64, fixes incompatibilities with certain Windhawk mods that hook `CreateWindowExW` such as [Taskbar Volume Control](https://windhawk.net/mods/taskbar-volume-control).
* On ARM64, fixes a very slim chance bug where hooked functions would cause a crash when called until a reboot.
* ep_taskbar: Now statically links to private functions it uses. (ab99f26)
* Taskbar10: Fixed folder toolbar menus and Toolbars > New toolbar not working on builds with `TrayThreadBSTA` (54481602) feature flag turned on, such as 26100.5074+. (#4542) (1bbe207)
* GUI: Windows 8 Network flyout is now no longer an option on builds >= 25346 as van.dll was removed. Thanks @m-wigley for the fix! (#4478) (72c6983)
* On Windows 11 22H2+, Windows 10 (ExplorerPatcher) taskbar a.k.a. ep_taskbar is now used by default. (ad2fa72)
##### 2
* Fixed weather button not having an icon. (#4545) (6959c69)
* You may need to perform "Clear weather widget local data" in EP properties > Weather.
##### 3
* File Explorer: Fixed "Shrink address bar height" resulting in broken graphics on recent 24H2 builds. (#4552) (6d946bd)
* Start10: Fixed open/close animation patching on x64 27938+ and ARM64 27881+. (201a7e5, 79f8dd3, f873888, 465117e, 4434d10)
* Start10: Fixed Windows 10 Start menu refusing to open when the new Windows 11 Start menu feature flag(s) are enabled. (#4523) (afd109f)
* Fixed Windows 10 Alt+Tab and Windows 10 taskbar Win+X functionality on ARM64 226x1 and 27686+. (18dfcd0)
##### 4
* File Explorer: Corrected shrunk address bar toolbar button size when Servicing_CFDNavButtonsTheming (NI: 56845961, GE: 52061322) is enabled. (#4552) (9e91030)
##### 5
* Start10: Fixed Windows 10 Start menu not opening on 22H2/23H2 ARM64. (c08b0a6)
##### 6
* File Explorer: XAML folder views are now disabled when Windows 11 Command Bar is not used. (80414f5)
* This fixes crashes when navigating away and returning to Home/Gallery on 22H2/23H2 (#3447), and when opening Home on 26xxx.7019+.
* File Explorer: Fixed Alt+D not working on builds with modern (XAML) navigation bar in File Explorer. (#2847) (a80d9dc)
* File Explorer: Mitigated breakages on builds with tabs in File Explorer: (75178ec, df7d604)
* Fixed menu bar behavior when Windows 7 Command Bar is used. Pressing Alt will now summon the menu bar immediately like it used to. (#2676)
* Fixed window position and size saving when Windows 10 Ribbon is used. (#2243)
* Taskbar10: These settings now take effect on ep_taskbar: (#4097) (48e1de3)
* Pinned items act as quick launch (don't group with active apps)
* When the taskbar shows button labels, remove the extra gap around pinned items
Known issues we will address in the short term:
* Changing weather icon pack to "Microsoft" has no effect.
* On Nickel (Windows 11 22H2/23H2), when the new Windows 11 Start menu is enabled, using Windows 10 or Windows 10 (ExplorerPatcher) taskbar will crashloop explorer.exe.
## 22631.5335.68
Tested on OS builds 22621.3296, 22631.5189, 22631.5335, 26100.3476, 26100.4061, and 26100.4188.
##### 1
* Start10: Fixed Pin to Start on 226x1.4541+ and 261xx.2454+. (#3984) (4ef3667, 123ea8b)
* sws: Added support for 24H2. (#3765)
* ep_dwm: Added support for 24H2. (#3555)
* `ep_dwm.exe` has been renamed to `ep_dwm_svc.exe` to get around 24H2 upgrade blocks. (115b462)
* ep_dwm: Now always unregistered on uninstallation, regardless of whether it was running during the uninstallation or not. (858b634)
* Setup: The failure message now displays the associated code line number that failed, to assist in troubleshooting. (c64a17e)
* Taskbar10: Fixed disabling immersive menus on ARM64. (8b4d8db)
* Taskbar10: Fixed Win+X menu still having Windows Terminal entries when Windows Terminal is not installed, that crashes Explorer when selected. (1b20cbd, 207f669)
* For now, if you want to have PowerShell entries, Windows Terminal must be uninstalled.
* Taskbar10: Fixed Win+X entry clicks doing nothing on 26xxx.5551+ ARM64.
* GUI: Added dropdown indicators to dropdown entries. (9f71a5c)
* GUI: The language names now include the country name. (3f11766)
* Localization: Added Czech translations. (Thanks @9hb, @andrewz1986, and @Panzimy!)
* Localization: Added Spanish (Spain) translations. (Thanks @AlejandroMartiGisbert!)
* ep_taskbar: Added support for "Show desktop button: Hidden" setting. (#4020) (1be6658)
* ep_taskbar: Fixed a bug that prevented shortcut global hotkeys from working on 24H2. (#3777, #4016)
* ep_taskbar: Fixed a bug that prevented the taskbar from resizing properly after DPI changes. (#3796)
* ep_taskbar: Added the following languages: German, French, Hungarian, Indonesian, Italian, Korean, Lithuanian, Dutch, Polish, Portuguese (Brazil), Romanian, Spanish (Spain), Turkish, Ukrainian, Chinese (Simplified).
* ep_taskbar: Fixed a number of memory leaks and code/behavior inaccuracies.
##### 2
* ❗ **ep_taskbar: Fixed incompatibility with 26200.5603 (Dev), 26120.4151 (Beta), and 26100.4188 (Release Preview).** (#4321)
* ep_taskbar: Now supports all Windows 10 versions supported by EP (17763/1809+). (aec8c70, 1edb989)
## 22621.4317.67
Tested on OS builds 22621.3296, 22631.4391, 26120.961, 26100.1150, and 26100.2161.
##### 1
* Taskbar10: Win+X now works again on 226xx.4317+. (cc9b6b3, #3837)
* Start10: Fixed an issue where the resource loader failed when the drive letter of the boot drive is other than C:. Thanks @ittrgrey for pointing out! (fc25c25)
* Start10: Fixed an issue where the Start menu crashes when summoning the context menu of an item that has jump list entries on builds 226xx.4391+ and 261xx.2130+. (4978024, #3842)
* ep_taskbar: Fixed an issue where "Not responding" windows are not handled properly.
* ep_taskbar: Flashing taskbar items are now animated.
* ep_taskbar: Narrator now describes the "Show desktop" button.
* ep_taskbar: `TrayUI` class is now exported.
* Localization: Added translations for Portuguese (Brazil). Thanks @thiagojramos!
## 22621.3880.66
Tested on OS builds 19045.4598, 22621.3296, 22621.3810, 26120.961, and 26244.5000. (Note: 22621 and 22631 share the same OS files)
##### 1
* Taskbar10: Introduced a new taskbar implementation: Windows 10 (ExplorerPatcher). (146070d, 0b86e55)
* You can try this implementation out by changing the "Taskbar style" to "Windows 10 (ExplorerPatcher)".
* For now, this is **only available for builds 22621, 22631, and 22635.** Other builds will not have the option.
* Refer to [this wiki article](https://github.com/valinet/ExplorerPatcher/wiki/ExplorerPatcher's-taskbar-implementation) for more information including important ones.
##### 2
<details>
* Taskbar10: Due to false positive antivirus detections, the new taskbar implementation is no longer bundled in the setup program. (48c2a75)
* If you want to use the new taskbar implementation, you can download the appropriate DLL for your system from the [Releases](https://github.com/ExplorerPatcher/ep_taskbar_releases/releases/latest) page of its releases repository, and then manually putting it in `C:\Program Files\ExplorerPatcher` without the architecture specifier.
* For example, for 226xx builds on x64-based systems, download `ep_taskbar.2.amd64.dll`, rename to `ep_taskbar.2.dll`, and lastly put it in `C:\Program Files\ExplorerPatcher`.
</details>
##### 3
* Introduced support for ARM64 devices. (992b3a6, 2e4e4f5, b76c0e4, c9884b2, 57f63ad, 78788ec, 4799b4b, 5d0d218)
* These builds are only tested on and made to work with 24H2 ARM64 builds. Older ARM64 Windows versions than 24H2 may not work as expected.
* Added an "Update now" button into update notifications for easier updating. (2b9c747, 8c16a9a)
* Revised how files are packed in ep_setup for smaller size and easier maintenance. (30579b0, b253625, 04fd2b7, db54ce9, 126c024, c0201ff)
* EP's taskbar implementation for 24H2 is now available in [its releases repository](https://github.com/ExplorerPatcher/ep_taskbar_releases/releases/latest), as `ep_taskbar.5.dll`. If you want to try this out, follow the steps explained above.
##### 4
With this update, ExplorerPatcher is now officially compatible and supported on Windows 11 24H2 🥳🎉
* Start10: Now works again on 24H2 and 226xx.3930+. (755f101, 7e0f7eb, b473114)
* Taskbar10: EP's taskbar DLLs are now included again in the setup files. (d9595fc)
* Taskbar10: Network icon now shows again on 24H2. (7e0f7eb, b473114)
* Start10: Fixed positioning when the taskbar is not placed at the bottom, on 24H2 and latest 22H2/23H2 builds. (de2532d, ea5881f)
* Taskbar10: Fixed taskbar jump list flyout positioning when the taskbar is not placed at the bottom, on latest 22H2/23H2/24H2 builds. (39609e4)
* Setup: Updated the code for dealing with locked files, this should reduce the chances of getting setup failures due to locked files. (7e0f7eb)
* ep_taskbar: Fixed tray icons not being saved.
* ep_taskbar: Removed the Copilot button on 22H2.
##### 5
* Taskbar10: Fixed jump list positioning patch on latest builds with `TaskbarJumplistOnHover` feature flag. (#3615) (351a020)
* Taskbar11: Fixed Task Manager menu entry doing nothing on 24H2+. (#3021, #3556) (060066c)
* Start10: Fixed symbols mechanism when custom `StartUI_.dll` is used. (0f38628)
* Start10: Increased reliability of ARM64 patterns for restoring the animations and fixing positioning. (#3566) (2ea3894)
* ep_taskbar: Fixed the task band not having a handle when the taskbar is unlocked.
* ep_taskbar: Fixed scroll arrows in window list popups (`ExtendedUI`) having weird appearance and behavior.
##### 6
* Updates: Fixed a bug where empty UpdateURL registry values would break the updates system. (#3668) (ac14c75)
* Setup: Cleaned some unneeded stuff in the setup binary. (9811810)
* Misc: Restored exported functions for launching/restarting Explorer: `ZZLaunchExplorer`, `ZZLaunchExplorerDelayed`, and `ZZRestartExplorer`. (9811810)
##### 7
* Taskbar10: The registry key for the "Combine taskbar labels" setting is no longer redirected. (eb1f1ec, 2a6fb15)
* This means you can now configure this reliably both from EP's Properties dialog and the Settings app.
* If you are using EP with Windows 11 taskbar on Windows 11 builds before 226x1.2361 (builds without the Never Combine option on the Windows 11 taskbar), please make sure that this is set to "Always" to prevent issues.
* ep_taskbar: Now supports EP Weather. (#3546)
* ep_taskbar: Disabled app icon animations in the notification center button due to crashes when receiving a large number of notifications. (#3605)
* ep_taskbar: Fixed an issue where fallback UWP app icons do not show up, such as [Okular](https://okular.kde.org)'s. (#3754)
* ep_taskbar: Fixed an issue where the primary taskbar's monitor location is not remembered. (#3719)
* ep_taskbar: Implemented Win+X hotkey. (#3671)
* ep_taskbar: Initial support for [Windhawk](https://windhawk.net) mods. The following classes are now exported: `ClockButton`, `CTaskListThumbnailWnd`, `CTaskBand`, `CTaskBand::CLauncherTask`, `CTaskBtnGroup`, `CWindowTaskItem`, `CImmersiveTaskItem`, `CTaskGroup`, `TaskItemFilter`, `CTaskListWnd`, and `CTaskThumbnail`. (#3769)
* Check [this list](https://github.com/valinet/ExplorerPatcher/wiki/ExplorerPatcher's-taskbar-implementation#windhawk-mods-support) for compatibility info.
* The mods themselves need to be manually updated to support ep_taskbar. Please contact the respective mod authors for this.
## 22621.3527.65
Tested on OS builds 22621.3296, 22621.3447, 22621.3527, 22635.3566, 26058.1000, 26120.461, and 26200.5001. (Note: 22621 and 22631 share the same OS files)
##### 1
* Taskbar10: The Windows 10 taskbar option is now no longer available on 26002+. (#3053, e57a6b0)
* This is to comply with Microsoft's removal of the stock Windows 10 taskbar in `explorer.exe` of said builds.
* Start10: Fixed Pin to Start on 226xx.3420+ (22H2, 23H2) and 25169+ (24H2). (232fe6b)
* Start10: Reverted the menu closing delay fix when EP is injected only into `StartMenuExperienceHost.exe` for now. (e59c34c)
##### 2
* Start10: Fixed a bug where the recently introduced "account suggestions" prevents the user tile menu from opening on later 22H2/23H2 builds and 24H2. (d11445a)
##### 3
* All: Updated some patterns to work with 22635.3430+ (Beta) and recent 24H2 builds. (6d22947)
* This should fix the Windows 10 start menu crashing and Win+X not working on both aforementioned builds when symbols are not yet downloaded.
##### 4
* Updates: Support for `ep_make`, a new script which builds ExplorerPatcher locally on your computer. Read more [here](https://github.com/valinet/ep_make). (80592f6)
* GUI: Reorganized "About" and "Uninstall" sections. (4794713)
* ep_weather: Fixed alignment.
##### 5
* Weather: Layout fixes. (57b44d2, 2112a18)
## 22621.3296.64
Tested on OS builds 22000.2538, 22621.1992, 22621.3155, 22621.3235, 22621.3296, 25951.1000, and 26058.1000.
##### 1
* Taskbar10: Fixed a bug where SCOOBE would repeatedly crash Explorer when Language Switcher is set to anything other than Windows 10 (the default). (fe7f800, 5c35f58)
* Taskbar10: Refined the method for aligning the Windows 11 Start menu and Search flyouts when using the Windows 10 taskbar on 22621.2792+. (8f84a96)
* This should fix related crashes during logon and screen resolution change on 26063+.
* Taskbar10: Revised the method for restoring acrylic to the Windows 10 taskbar on 22621+. (5e7bad2)
* This should fix the taskbar being fully transparent on recent builds such as 22635.3066 and 22621/22631.3296 despite not having any other customization software.
* ExplorerPatcher should now avoid further injection when the system is in safe mode. (95ea9e7)
* Setup: Moved uninstallation prompt dialog existence check to the GUI. (0589a25)
* Various changes to prepare for the alternate taskbar reimplementation that will be released in the future. (a0885c6, 0791bd7, fc61884, 623ecee)
##### 2
* Taskbar10: Revised the method for disabling DisableWin10Taskbar present on 26002+. (913b2d0)
##### 3
* Start10: Support for OS builds 226xx.3420+ and 24H2, including fixed animations (5e25663, c286ab5).
* Start10: Prevent menu closing delay when patching standalone (without ExplorerPatcher injecting `explorer.exe`) (45bd735).
## 22621.3007.63
Tested on OS builds 22000.2538, 22621.1992, 22621.3007, 22621.3085, and 22621.3155.
##### 1
* **Fixed a bug where `explorer.exe` would crash repeatedly when the system is in OOBE.** (36ebe5a)
* ExplorerPatcher now no longer loads if it detects that the system is in OOBE or in credential reset.
* Taskbar10: The Network and Battery flyouts on later 22621 builds onwards and Windows 10 now open instantly without issues. (97fd483)
* Taskbar10: Allowed the use of search box (without highlights) on Windows 11. (0157ecc)
* **The behavior when the Start or Search menu is open is currently not the same as Windows 10, and we have no plans to fix this yet. Please do not make new Issues regarding this.**
* Start10: Added proper handling when the Windows 10 start menu is not available (e.g. 24H2/Canary builds). (3c8809e)
* Start10: Removed the original method for fixing Jump List (right click) views. (79b0f68)
* File Explorer: The address bar shrinking is now more accurate with pixel-perfect height compared to Windows 7, 8.1, and 10 (without the modern search). (e0b97e2)
* GUI: Added "Uninstall" section containing a button to launch the uninstaller. (0c5021b)
* Setup: There should now be fewer .prev files, and uninstallation should be cleaner as well. (296c6a0)
* Symbols: Added `explorer.exe` symbols for 22621+ and unified the method for Windows 10 Alt+Tab on 22000. (1f2e2c4)
* Localization: Added translations for Lithuanian, Polish, Russian, and Turkish.
##### 2
* Taskbar10: Improved animation performance when centering and/or EP Weather is not enabled, also fixed search box positioning on small taskbar without centering. (22d9e3c)
* Setup: Fixed a bug that placed `wincorlib.dll` on Windows 10 when it is not supposed to, causing the start menu to crash. (610ba7f)
##### 3
* Taskbar10: Fixed flyout positioning on Windows 11 26058+. (dfe340d)
* Slightly improved performance when interacting with the taskbar, both new and old. (dfe340d)
##### 4
* Setup: Reverted the method for ending `explorer.exe` and its subprocesses. (fdc357b)
## 22621.2861.62
Tested on OS builds 22621.2715, 22621.2861, 22631.2787, 22631.2861, 22635.2915, and 23590.1000.
##### 1
* Taskbar10: Various *important* fixes: (ec68783)
* Revised the method for enabling the old taskbar due to a very rare issue where the old taskbar couldn't be enabled with the previous method. (#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+.
* Taskbar10: Fixed white boxes on submenus when context menu skinning is disabled. (72f1458)
* File Explorer: Fixed crashes when using Windows 7/10 control interface on OS builds 22635.2915+. (3a1b8b8)
* Localization: Added translations for French, German, Hungarian, Korean, Romanian, and Ukrainian.
* The properties window has been made slightly wider to accomodate the newly added languages. (#2574)
* Localization: Added a language switcher to the About section of Properties window. (7c3be29, a7a3d27)
##### 2
* Symbols: Fixed languages with longer strings such as French crashing Explorer when attempting to download symbols. (ce9f973)
**Note:** Due to the breakages as well as frequent changes happening in Canary builds, we strongly do not recommend using ExplorerPatcher on Canary builds for now.
## 22621.2506.60
Tested on OS builds 22000.2416, 22000.2538, 22621.2361, 22621.2506, 22621.2715, 22631.2787, 23585.1001, and 23590.1000.
#### Details
##### 1
* Taskbar10: Fixed Windows 11 Start menu and Search positioning on builds 22621.2787+ and 23545+ (Dev). (ac268b1, 7d0cdde)
* File Explorer: Added option to disable the modern navigation bar of Moment 4. (2dc1340)
* File Explorer: Restored "Apply Mica" functionality on OS builds 22621+. (f62c532)
* Localization: Officially added translations for the following languages: Chinese (Simplified), Chinese (Traditional), Dutch, Indonesian, Japanese
* Thanks to [everyone involved](https://github.com/valinet/ExplorerPatcher-L10N#acknowledgements)!
* GUI: Decoupled the Properties window into `ep_gui.dll` from the main DLL in order to reduce the main DLL size and to allow scalable localization. (f6f6d89, 639d7aa)
* `rundll32 C:\Windows\dxgi.dll,ZZGUI` will continue to work as before.
#### ⚠ Important notice for translators ⚠
In this update, most if not all user-facing parts of ExplorerPatcher have been made localizable.
* The English texts have been put together into [here](https://github.com/valinet/ExplorerPatcher/tree/master/ep_gui/resources/lang) and [here](https://github.com/valinet/ExplorerPatcher/tree/master/ep_setup/resources/lang).
* Non-English texts have been designed to be put into [this separate repository](https://github.com/valinet/ExplorerPatcher-L10N). Feel free to make a PR there if you want to contribute to translations.
* Some texts have been updated to be more concise and accurate, so for existing translation fork maintainers, please double check the translations before making a PR to the said repository.
* Also for translation fork maintainers, a large number of conflicts will happen if you decide to continue merging changes from the main repository.
* Please let us know through Issues if there are still user-facing parts of ExplorerPatcher that are not localizable.
We apologize for the additional work that this change might cause. We hope that this one-time change will make it easier for translators to localize ExplorerPatcher and also easier for both translators and users to keep ExplorerPatcher up to date.
## 22621.2428.59
Tested on OS builds 22000.2416, 22621.2428, 23555.1000, and 23560.1000.
#### Details
##### 1
Note: After updating to this version, the symbols will be re-downloaded even if they have been downloaded before.
* Taskbar10: Fixed Control Center and Toast Center positioning on build 25951 (Canary). (dca0b3a)
* Taskbar10: Fixed start menu position when the taskbar is at the left or right side on Moment 4 builds. (a57471f)
* Taskbar10: Fixed the Windows 10 taskbar background patch to not crash anymore on build 25951 (Canary). (b52bd79)
* Taskbar10: Made classic theme taskbar fonts more accurate. Thanks @aubymori! (8fc53a1)
* Start10: Fixed a bug where certain texts in the Windows 10 Start menu stayed in English. (655e62c, 5321766)
* Start10: Properly fixed start menu showing/hiding along with its original animations on builds 22000.65+. (7e2f768)
* GUI: Fixed a bug where "Remember last used section" doesn't remember the current page after being enabled. (11160c8)
* Symbols: Reworked how symbols are managed so that symbols don't need to be successfully downloaded in succession. (8412bd6)
* Setup: Fixed uninstallation of EP installations that have went through upgrades before the proper Pin to Start fix. (845d2b5, a7c87ce)
## 22621.2361.58
Tested on OS builds 22000.2416, 22621.1, 22621.2134, 22621.2361, 22631.2338, and 23545.1000.
#### Details
##### 1
* Taskbar10: Fixed Windows 10 taskbar not showing up on Windows 11 builds with "Never combine" on the new taskbar. (bc3bbc7)
* Taskbar10: Fixed pen menu crashing `explorer.exe` on 22621.2134+. (1977d78)
* Taskbar11: Fixed a bug that crashed `explorer.exe` when right clicking the new taskbar on Windows 11 builds with "Never combine" on the new taskbar. (6023718)
* File Explorer: EP now tries to avoid crashes related to the new Windows App SDK views. (b426d2c)
* On OS builds 22621+, fixed a bug that crashed `explorer.exe` when required functions in `twinui.pcshell.dll` (for Win+X and Windows 10 Alt+Tab) could not be found using the fallback method. (6023718)
##### 2
* Taskbar11: Fixed a bug that reset the "never combine" setting on OS builds 22621.2361+ (#2207) (085b3dd)
* Taskbar10: Fixed Wi-Fi flyout buttons on OS build 22621 (0706393)
* Start10: Fixed start menu folders, show recently added, and show frequently used apps settings not being applied on OS builds 22621.2134+ (e28940d)
##### 3
* Start10: Pin to Start/Unpin from Start has been properly fixed on Start Menu and Explorer (but not Search yet) of all Windows 11 builds. (15c07a0)
* Start10: Fixed non-UWP apps not appearing on Dev channel builds 23545+. (a4f5bd0)
* File Explorer: Fixed command bar settings not being applied on non-primary Explorer instances on Windows 11. (001e8d8)
##### 4
* Taskbar11: Restored the fix for the bug that reset the "never combine" setting on OS builds 22621.2361+, which was removed in 22621.2361.58.3 by accident. (9f04110)
* Start: "Start menu style" now requires restart so that Pin to Start/Unpin from Start on Explorer works properly. (bdd71ef)
* Taskbar10: Disabled the patch for proper acrylic background on Canary builds (25000+) for now. (4ee742f)
Many thanks to @Amrsatrio for sustained efforts in maintaining and improving ExplorerPatcher.
Thanks to @ARestrepo228 for hints on fixing Pin to Start/Unpin from Start.
## 22621.2283.57
Tested on OS build 22621.2283. Installer requires Internet connectivity.
#### Details
##### 1
* Taskbar10: Fixed Action Center, Control Center, and notification toasts placements on OS builds 22621.2134+ (thanks @Amrsatrio).
* Taskbar10: Fixed a bug that prevented Task View and/or the window switcher (`Alt`+`Tab`) from working on OS builds 22621.2134+ (thanks @Amrsatrio).
* Taskbar10: Fixed a bug that prevented the volume and brightness flyouts from displaying (thanks @Amrsatrio).
* Taskbar10: Fixed a bug that prevented the `Win`+`A` (Action Center), `Win`+`N` (Control Center), and `Win`+`B` (Focus on tray overflow button) shortcuts from working on OS builds 22621.2134+ (thanks @Amrsatrio).
* Taskbar10: Fixed the context menu of the new IME button OS builds 22621.2134+ (thanks @Amrsatrio).
* Taskbar11: Fixed a bug that crashed `explorer.exe` when right clicking the taskbar on OS builds 22621.2134+.
* Quality of life improvements regarding symbol data (thanks @Amrsatrio).
Learn about known issues and track the progress regarding this update [here](https://github.com/valinet/ExplorerPatcher/pull/2097). Special thanks to @Amrsatrio for providing support towards fixing ExplorerPatcher on newer OS builds.
##### 2
* Fixed a bug that crashed `explorer.exe` on OS builds lower than 22621 (Windows 11 22H2). (dfee1ae)
## 22621.1992.56
Tested on OS build 22621.1992. Installer requires Internet connectivity.
#### Details
##### 1
* Windows 10 Start menu: Fixed a bug that prevented the menu from working on OS builds 22621.1413 and newer (46c5041). Please read these important notes regarding the fix [here](https://github.com/valinet/ExplorerPatcher/discussions/1679).
##### 2
* Windows 10 Start menu: Fixed a bug that prevented centering on Windows 10 (275a91f).
##### 3
* Windows 10 taskbar: Correct centering of taskbar items when search box is enabled in Windows 10 (2e43c67).
## 22621.1555.55
Tested on OS build 22621.1555. Installer requires Internet connectivity.
#### Details
##### 1
* Weather: Fixed a bug that prevented the widget from loading when using the Microsoft icon pack. (968d969)
##### 2
* Simple Window Switcher
* Support for individual list and grouping for UWP apps (implemented grouping and naming enhancements based on using information associated with `AppUserModelID`s)
* Ability to switch between global and local window lists when the switcher is shown.
* Maintain position in the list when certain events occur, like closing windows or switching between the global and local window lists.
* `Del` key closes the currently selected window(s).
* Fixed a bug that prevented newly spawned windows while the switcher is open from going to the back of the list.
* Fixed a bug that prevented window lists from building properly when windows were slow to close.
* Fixed a bug that prevented proper activation of pop-up windows under certain conditions. For example, the switcher is now able to correctly switch to the "Error Checking" window in This PC - right click C: - Properties - Tools - Error checking - Check.
## 22621.1413.54
Tested on OS build 22621.1413.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 1
* Windows 10 taskbar: Fixed a bug that made the following functionalities have issues or stop working: Task View button, `Win-Tab`, `Alt-Tab` after pressing `Win-Tab`, flyouts alignment, notification center alignment, `Win` key shortcuts on OS build 22621.1413+ (thanks @CthRio for the heads up). (0ad140c)
* Setup: Fixed a bug that prevented File Explorer from starting automatically after servicing the application if the installer run using different credentials than the logged on user (thanks @Abestanis). (1738b45)
* Weather: Fixed widget icons when using Microsoft icon pack. (2a1aad2)
* Implemented a mechanism to stop repeated crashes. (d7e5b7d)
##### 2
* Weather: Fixed a bug that prevented the widget from displaying correctly. (a5e5287)
##### 3
* Windows 11 Start menu: Better enforcement for disabling the "Recommended" section. (27a8fd9)
##### 4
* Windows 11 Start menu: Fixed a bug that prevented the menu from working when the setting "Disable Recommended section" is used and the display scaling is 125%. (5649a83)
##### 5
* Fixed a bug that could crash File Explorer on older OS builds, like 17763 (LTSC 2019). (6bc2ea5)
## 22621.1344.53
Tested on OS builds 22621.1344, 22000.1574, and 19044.1466.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 1
* Windows 10 taskbar: Fixed a bug that crashed `explorer` on OS build 22621.1344. (f9d702e)
* Weather: Fixed a bug that displayed the widget area using a different background color. (cc0af46)
* Weather: Fixed a bug that might throw a script error when certain elements are not ready. (c083327)
* Weather: Fixed a bug that could prevent the widget from properly loading. (a8c7fba)
* ep_extra: Implemented a loadable module for Windows 7's Alt-Tab. (ca8ce13)
* ep_extra: Implemented an `ep_extra`-based loader. (1f4b586)
## 22621.819.52
Tested on OS builds 22621.819 and 22000.1098.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 1
* Windows 11 Start menu: Implemented centering on screen when taskbar is not at the bottom. (4212e35)
* Windows 11 taskbar: Option to use the stock taskbar context menu. (451db3c)
* Fixed a bug that could display the Start menu on a wrong monitor or outside the screen when the taskbar was moved to the top of the screen and the previous setting was at the right edge of the screen. (53fad19)
##### 2
* Windows 11 Start menu: Fixed a bug that prevented the disable "Recommended" section feature from working when the scaling level of the screen the Start menu is displayed on is set to 125% (120 DPI). (9f9d43e)
## 22621.608.51
Tested on OS builds 22621.608 and 22000.1042.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 1
* Fixed a bug that could prevent the Windows 10 network or battery flyouts from showing on OS build 22000.
* Fixed the Windows 10 network and battery flyouts on OS build 22621.
* Weather: Fixed a bug that displayed the widget contents with incorrect left padding.
##### 2
* sws: Support for changing selection in window list using the mouse wheel (suggestion by andrewz).
* Fix broken "Cascade windows", "Show windows stacked", "Show windows side by side", and "Undo ..." options in taskbar context menu (reported by iamk9008).
##### 3
* sws: Option to have the scroll wheel change the selection when using the switcher:
* "Never" (default), the same behavior as two versions ago, which means that, when the switcher is active, it does not react to the scroll wheel being used.
* "When cursor is over the switcher" has the switcher react to the scroll whell and advance/reverse the selection only when the cursor is above the switcher
* "Always" has the switcher react to the scroll whell and advance/reverse the selection regardless of where the cursor is placed. In this mode, background applications won't receive scroll wheel updates until the switcher is closed, regardless of the "Scroll inactive windows when hovering over them" setting from Windows.
* sws: Fixed a bug that had the scroll wheel move selections in the opposite direction compared to Windows 7 Alt-Tab's behavior. When enabled, the scrolling up selects the previous window in the list, while scrolling down selects the next window in the list. To obtain the previous behavior, which is to scroll up to select the next window, and to scroll down to select the previous window, set `ScrollWheelInvert` to `1` in `HKCU\Software\ExplorerPatcher\sws` (5cef3b1).
* sws: Fixed a bug that could unexpectedly move the switcher to another monitor when your cursor was placed on the other monitor, the option to have the switcher display on the monitor the cursor is placed on is enabled and the switcher finished refreshing its data in the background (https://github.com/valinet/sws/commit/8b68539201102801367ef8f3716b9f1260e2dbe5).
* sws: Fixed a bug that could prevent hotkey associations from being properly cleaned up when you disabled the setting to have a per-application window list (https://github.com/valinet/sws/commit/c5776e5a6a0c5495892a15e16a1def31b225fc51).
* sws: Fixed a bug that could prevent correct reload of settings when entries were directly deleted from the registry (cbc5f19).
##### 4
* Windows 11 taskbar: Fixed a bug that could crash `explorer.exe` when right clicking certain system tray icons on 22621-based builds. Thanks for the reports about this issue. (a6a88b1)
##### 5
* Windows 11 Start menu: Fixed a bug that prevented the menu from taking into account the "Layout" setting from Windows Settings - Personalization - Taskbar on 22621-based builds. (2572a80)
##### 6
* Fixed a bug that could cause the host process of ExplorerPatcher to crash under certain circumstances. (d7a0385)
## 22622.450.50
Tested on OS build 22622.450.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 1
* Support for OS builds 22621+. Read more [here](https://github.com/valinet/ExplorerPatcher/issues/1082#issuecomment-1206690333).
* Added an option to shrink address bar height in File Explorer windows (thanks @krlvm).
##### 2
* Support for disabling the modern search bar in 32-bit applications as well (thanks @krlvm).
* Fixed a bug that could prevent deleting registry keys when the application was supposed to (for example, when uninstalling or toggling certain settings).
##### 3
* Fixed incorrect check for running dwm instances in `ep_dwm`
* Fixed a use-after-free bug in `ep_dwm` (thanks @ibhk)
## 22000.795.48
Tested on OS build 22000.795.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 1
* Weather: Fixed a bug that could hang the widget and lead to an infinite loop with the program using an entire CPU core when the computer resumed from sleep or hibernation.
* Weather: Fixed a bug that had the widget display the error page when the computer lost network connectivity; instead, now the widget continues to display the cached data from the previous refresh (if any).
##### 2
* Weather: Fixed a bug that could hang explorer and the weather widget host process under certain circumstances, for example, when explorer restarted.
## 22000.778.47
Tested on OS build 22000.778.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 1
* Built-in support for OS build 22000.778.
* Fixed a bug that had the Start button context menu / Win-X menu / power user menu fail to display and potentially lock the shell on OS builds 22000.778+ and 22621+
##### 2
* Fixed a system high DPI-related bug that caused wide Windows 10 taskbar buttons and incorrect (desktop) icon spacing
## 22000.708.46
Tested on OS build 22000.708.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 1
* Built-in support for OS build 22000.708.
* Added configuration options for the new Windows Spotlight desktop background feature, including:
* Hide the "Learn about this picture" icon
* Choose which items from the Windows spotlight icon context menu to have replicated in the desktop context menu (legacy context menu only)
* Set a schedule for "Switch to next picture"
* Manipulate the feature from the Properties UI, bypassing the desktop icon
* The Properties UI hides sections that are not applicable to your current settings; for example, the "Weather" tab is not displayed if you've selected the Windows 11 taskbar, as none of the options in there apply when in this mode.
##### 2
* sws: Fixed a bug that created unnecessary paint events when a window was flashing and the switcher is not shown
##### 3
* Added option to hide the "Show desktop" button, but still retain its functionality, when using the Windows 10 taskbar
* Fixed a bug in Windows 10 where the Start menu was displayed centered by default
##### 4
* Weather: Show "Reload" link when data fails to load (thanks Varun A. for the suggestion)
* sws: Draw placeholder thumbnail when a proper thumbnail cannot be obtained (for example, due to a window having an invalid width or height)
* sws: Fixed a bug that could prevent the switcher from identifying when the desktop is in the foreground
* sws: Fixed a regression that could prevent the switcher from properly detecting foreground window changes
* sws: Fixed a bug that made very small windows have a rectangle area too small for properly working with in the switcher
##### 5
* Fixed a bug that could prevent Control Panel link redirection from working correctly
* Weather: Fixed a bug that prevented the widget from working when WebView2 Runtime >= 102.0.1245.33
##### 6
* Fix a bug in the Properties window that had the it fail to display some sections under default settings
## 22000.675.45
Tested on OS build 22000.675.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 1
* sws: Fixed a bug that displayed a wrong window to switch to when a background application was denied the request to have the foreground window by the OS (#1084)
##### 2
* libvalinet: Fixed a memory leak in `toast.h`
* sws: Fixed a bug that caused the switcher to display non-responsive (hung) immersive (UWP) windows twice in the list
##### 3
* sws: Fixed a bug that created unnecessary paint events when a window was flashing and the switcher is not shown
## 22000.613.44
Tested on OS build 22000.613.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 1
* Option to disable Win+F (Feedback Hub) hotkey
* Built-in support for OS build 22000.613
##### 2
* Weather: Fixed a bug that had "COM Surrogate" display as a running app in Task Manager after the widget flyout was opened the first time
* Weather: Fixed a bug that could hang or lock the shutdown/restart/sign out process when using the weather widget
## 22000.556.43
Tested on OS build 22000.556.
Please make sure you are connected to the Internet while installing, the application might need to perform one-time downloads for several resources in order to enable full functionality.
#### Details
##### 4
* Option to enable legacy file transfer dialog
##### 3
* Option to enable classic drive groupings in This PC (thanks @lordmilko)
* Choice of Windows 11 Command Bar, Windows 10 Ribbon or Windows 7 Command Bar for File Explorer windows
##### 2
* Fixed Windows 10 taskbar showing fully transparent instead of the acrylic effect on newer OS builds (22581+)
##### 1
* Option to disable window Snap quadrants in Windows 11 (thanks @lordmilko)
## 22000.556.42 ## 22000.556.42
Tested on OS build 22000.556. Tested on OS build 22000.556.
@ -202,6 +900,14 @@ Please make sure you are connected to the Internet while installing, the applica
* Fixed Windows 10 taskbar button thumbnails on newer OS builds (22572+) * Fixed Windows 10 taskbar button thumbnails on newer OS builds (22572+)
* Fixed Windows 10 taskbar showing fully transparent instead of the acrylic effect on newer OS builds (22572+) * Fixed Windows 10 taskbar showing fully transparent instead of the acrylic effect on newer OS builds (22572+)
##### .38
* Fixed a bug that made the disable window rounded corners feature not work after signing out and then back into a user account
##### .39
* Weather: Fixed a bug that prevented the widget from starting up on new installations due to the folder `%APPDATA%\ExplorerPatcher` not existing
## 22000.469.41 ## 22000.469.41
Tested on OS build 22000.434. Tested on OS build 22000.434.

1
ExplorerPatcher-L10N

@ -0,0 +1 @@
Subproject commit 5a800eff30fd33da1a641f84175e7293b4b44b96

76
ExplorerPatcher.sln

@ -5,8 +5,8 @@ VisualStudioVersion = 17.0.32126.317
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExplorerPatcher", "ExplorerPatcher\ExplorerPatcher.vcxproj", "{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExplorerPatcher", "ExplorerPatcher\ExplorerPatcher.vcxproj", "{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE} = {AF02ABAC-EAEB-471C-9957-73D430B8B4DE}
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E} = {314A50C1-F0A0-4D0C-89E1-AD8F3951043E} {314A50C1-F0A0-4D0C-89E1-AD8F3951043E} = {314A50C1-F0A0-4D0C-89E1-AD8F3951043E}
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE} = {AF02ABAC-EAEB-471C-9957-73D430B8B4DE}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_generate_release_description", "ep_generate_release_description\ep_generate_release_description.vcxproj", "{C362CFBE-7C6B-4457-8D01-839818D42ECB}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_generate_release_description", "ep_generate_release_description\ep_generate_release_description.vcxproj", "{C362CFBE-7C6B-4457-8D01-839818D42ECB}"
@ -15,10 +15,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_generate_release_name",
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_setup", "ep_setup\ep_setup.vcxproj", "{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_setup", "ep_setup\ep_setup.vcxproj", "{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9} = {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87} = {1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87} {1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87} = {1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E} = {314A50C1-F0A0-4D0C-89E1-AD8F3951043E} {314A50C1-F0A0-4D0C-89E1-AD8F3951043E} = {314A50C1-F0A0-4D0C-89E1-AD8F3951043E}
{6BF03EEA-200A-4698-9555-057DD52B0C78} = {6BF03EEA-200A-4698-9555-057DD52B0C78} {6BF03EEA-200A-4698-9555-057DD52B0C78} = {6BF03EEA-200A-4698-9555-057DD52B0C78}
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9} = {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}
{2351A0DF-782C-4D74-85B7-0847D245D6B4} = {2351A0DF-782C-4D74-85B7-0847D245D6B4}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_setup_patch", "ep_setup_patch\ep_setup_patch.vcxproj", "{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_setup_patch", "ep_setup_patch\ep_setup_patch.vcxproj", "{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}"
@ -37,70 +38,141 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_weather_host_stub", "ep_
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_startmenu", "ep_startmenu\ep_startmenu.vcxproj", "{6BF03EEA-200A-4698-9555-057DD52B0C78}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_startmenu", "ep_startmenu\ep_startmenu.vcxproj", "{6BF03EEA-200A-4698-9555-057DD52B0C78}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_extra", "ep_extra\ep_extra.vcxproj", "{93FA47CC-7753-4F86-B583-69048F51C5AB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_extra_valinet.win7alttab", "ep_extra_valinet.win7alttab\ep_extra_valinet.win7alttab.vcxproj", "{A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}"
ProjectSection(ProjectDependencies) = postProject
{93FA47CC-7753-4F86-B583-69048F51C5AB} = {93FA47CC-7753-4F86-B583-69048F51C5AB}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ep_gui", "ep_gui\ep_gui.vcxproj", "{2351A0DF-782C-4D74-85B7-0847D245D6B4}"
ProjectSection(ProjectDependencies) = postProject
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E} = {314A50C1-F0A0-4D0C-89E1-AD8F3951043E}
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE} = {AF02ABAC-EAEB-471C-9957-73D430B8B4DE}
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|amd64 = Debug|amd64 Debug|amd64 = Debug|amd64
Debug|arm64 = Debug|arm64
Debug|IA-32 = Debug|IA-32 Debug|IA-32 = Debug|IA-32
Release|amd64 = Release|amd64 Release|amd64 = Release|amd64
Release|arm64 = Release|arm64
Release|IA-32 = Release|IA-32 Release|IA-32 = Release|IA-32
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Debug|amd64.ActiveCfg = Debug|x64 {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Debug|amd64.ActiveCfg = Debug|x64
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Debug|amd64.Build.0 = Debug|x64 {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Debug|amd64.Build.0 = Debug|x64
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Debug|arm64.ActiveCfg = Debug|ARM64
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Debug|arm64.Build.0 = Debug|ARM64
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Debug|IA-32.ActiveCfg = Debug|Win32 {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Debug|IA-32.ActiveCfg = Debug|Win32
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Debug|IA-32.Build.0 = Debug|Win32 {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Debug|IA-32.Build.0 = Debug|Win32
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Release|amd64.ActiveCfg = Release|x64 {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Release|amd64.ActiveCfg = Release|x64
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Release|amd64.Build.0 = Release|x64 {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Release|amd64.Build.0 = Release|x64
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Release|arm64.ActiveCfg = Release|ARM64
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Release|arm64.Build.0 = Release|ARM64
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Release|IA-32.ActiveCfg = Release|Win32 {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Release|IA-32.ActiveCfg = Release|Win32
{DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Release|IA-32.Build.0 = Release|Win32 {DB3E4319-2969-42B6-B7E8-BB57AA8C9FA9}.Release|IA-32.Build.0 = Release|Win32
{C362CFBE-7C6B-4457-8D01-839818D42ECB}.Debug|amd64.ActiveCfg = Debug|x64 {C362CFBE-7C6B-4457-8D01-839818D42ECB}.Debug|amd64.ActiveCfg = Debug|x64
{C362CFBE-7C6B-4457-8D01-839818D42ECB}.Debug|amd64.Build.0 = Debug|x64 {C362CFBE-7C6B-4457-8D01-839818D42ECB}.Debug|amd64.Build.0 = Debug|x64
{C362CFBE-7C6B-4457-8D01-839818D42ECB}.Debug|arm64.ActiveCfg = Debug|ARM64
{C362CFBE-7C6B-4457-8D01-839818D42ECB}.Debug|IA-32.ActiveCfg = Debug|Win32 {C362CFBE-7C6B-4457-8D01-839818D42ECB}.Debug|IA-32.ActiveCfg = Debug|Win32
{C362CFBE-7C6B-4457-8D01-839818D42ECB}.Release|amd64.ActiveCfg = Release|x64 {C362CFBE-7C6B-4457-8D01-839818D42ECB}.Release|amd64.ActiveCfg = Release|x64
{C362CFBE-7C6B-4457-8D01-839818D42ECB}.Release|amd64.Build.0 = Release|x64 {C362CFBE-7C6B-4457-8D01-839818D42ECB}.Release|amd64.Build.0 = Release|x64
{C362CFBE-7C6B-4457-8D01-839818D42ECB}.Release|arm64.ActiveCfg = Release|ARM64
{C362CFBE-7C6B-4457-8D01-839818D42ECB}.Release|IA-32.ActiveCfg = Release|Win32 {C362CFBE-7C6B-4457-8D01-839818D42ECB}.Release|IA-32.ActiveCfg = Release|Win32
{78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Debug|amd64.ActiveCfg = Debug|x64 {78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Debug|amd64.ActiveCfg = Debug|x64
{78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Debug|amd64.Build.0 = Debug|x64 {78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Debug|amd64.Build.0 = Debug|x64
{78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Debug|arm64.ActiveCfg = Debug|ARM64
{78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Debug|IA-32.ActiveCfg = Debug|Win32 {78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Debug|IA-32.ActiveCfg = Debug|Win32
{78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Release|amd64.ActiveCfg = Release|x64 {78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Release|amd64.ActiveCfg = Release|x64
{78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Release|amd64.Build.0 = Release|x64 {78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Release|amd64.Build.0 = Release|x64
{78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Release|arm64.ActiveCfg = Release|ARM64
{78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Release|IA-32.ActiveCfg = Release|Win32 {78D0C3CF-25C0-41D4-9359-0E9AB72B9874}.Release|IA-32.ActiveCfg = Release|Win32
{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Debug|amd64.ActiveCfg = Debug|x64 {2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Debug|amd64.ActiveCfg = Debug|x64
{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Debug|amd64.Build.0 = Debug|x64 {2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Debug|amd64.Build.0 = Debug|x64
{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Debug|arm64.ActiveCfg = Debug|ARM64
{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Debug|arm64.Build.0 = Debug|ARM64
{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Debug|IA-32.ActiveCfg = Debug|Win32 {2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Debug|IA-32.ActiveCfg = Debug|Win32
{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Release|amd64.ActiveCfg = Release|x64 {2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Release|amd64.ActiveCfg = Release|x64
{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Release|amd64.Build.0 = Release|x64 {2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Release|amd64.Build.0 = Release|x64
{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Release|arm64.ActiveCfg = Release|ARM64
{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Release|arm64.Build.0 = Release|ARM64
{2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Release|IA-32.ActiveCfg = Release|Win32 {2FD40B09-F224-4E9A-B2FE-A22B50B2DEBF}.Release|IA-32.ActiveCfg = Release|Win32
{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Debug|amd64.ActiveCfg = Debug|x64 {0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Debug|amd64.ActiveCfg = Debug|x64
{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Debug|amd64.Build.0 = Debug|x64 {0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Debug|amd64.Build.0 = Debug|x64
{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Debug|arm64.ActiveCfg = Debug|ARM64
{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Debug|IA-32.ActiveCfg = Debug|Win32 {0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Debug|IA-32.ActiveCfg = Debug|Win32
{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Release|amd64.ActiveCfg = Release|x64 {0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Release|amd64.ActiveCfg = Release|x64
{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Release|amd64.Build.0 = Release|x64 {0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Release|amd64.Build.0 = Release|x64
{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Release|arm64.ActiveCfg = Release|ARM64
{0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Release|IA-32.ActiveCfg = Release|Win32 {0C13E5F3-106B-4836-A7C2-8E5808A6ED78}.Release|IA-32.ActiveCfg = Release|Win32
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Debug|amd64.ActiveCfg = Debug|x64 {1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Debug|amd64.ActiveCfg = Debug|x64
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Debug|amd64.Build.0 = Debug|x64 {1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Debug|amd64.Build.0 = Debug|x64
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Debug|arm64.ActiveCfg = Debug|ARM64
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Debug|arm64.Build.0 = Debug|ARM64
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Debug|IA-32.ActiveCfg = Debug|Win32 {1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Debug|IA-32.ActiveCfg = Debug|Win32
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Release|amd64.ActiveCfg = Release|x64 {1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Release|amd64.ActiveCfg = Release|x64
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Release|amd64.Build.0 = Release|x64 {1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Release|amd64.Build.0 = Release|x64
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Release|arm64.ActiveCfg = Release|ARM64
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Release|arm64.Build.0 = Release|ARM64
{1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Release|IA-32.ActiveCfg = Release|Win32 {1ECCAB38-61B6-4C85-BBB5-2E2232DA3A87}.Release|IA-32.ActiveCfg = Release|Win32
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Debug|amd64.ActiveCfg = Debug|x64 {314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Debug|amd64.ActiveCfg = Debug|x64
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Debug|amd64.Build.0 = Debug|x64 {314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Debug|amd64.Build.0 = Debug|x64
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Debug|arm64.ActiveCfg = Debug|ARM64
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Debug|arm64.Build.0 = Debug|ARM64
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Debug|IA-32.ActiveCfg = Debug|Win32 {314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Debug|IA-32.ActiveCfg = Debug|Win32
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Release|amd64.ActiveCfg = Release|x64 {314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Release|amd64.ActiveCfg = Release|x64
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Release|amd64.Build.0 = Release|x64 {314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Release|amd64.Build.0 = Release|x64
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Release|arm64.ActiveCfg = Release|ARM64
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Release|arm64.Build.0 = Release|ARM64
{314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Release|IA-32.ActiveCfg = Release|Win32 {314A50C1-F0A0-4D0C-89E1-AD8F3951043E}.Release|IA-32.ActiveCfg = Release|Win32
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Debug|amd64.ActiveCfg = Debug|x64 {AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Debug|amd64.ActiveCfg = Debug|x64
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Debug|amd64.Build.0 = Debug|x64 {AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Debug|amd64.Build.0 = Debug|x64
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Debug|arm64.ActiveCfg = Debug|ARM64
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Debug|arm64.Build.0 = Debug|ARM64
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Debug|IA-32.ActiveCfg = Debug|Win32 {AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Debug|IA-32.ActiveCfg = Debug|Win32
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Release|amd64.ActiveCfg = Release|x64 {AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Release|amd64.ActiveCfg = Release|x64
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Release|amd64.Build.0 = Release|x64 {AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Release|amd64.Build.0 = Release|x64
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Release|arm64.ActiveCfg = Release|ARM64
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Release|arm64.Build.0 = Release|ARM64
{AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Release|IA-32.ActiveCfg = Release|Win32 {AF02ABAC-EAEB-471C-9957-73D430B8B4DE}.Release|IA-32.ActiveCfg = Release|Win32
{6BF03EEA-200A-4698-9555-057DD52B0C78}.Debug|amd64.ActiveCfg = Debug|x64 {6BF03EEA-200A-4698-9555-057DD52B0C78}.Debug|amd64.ActiveCfg = Debug|x64
{6BF03EEA-200A-4698-9555-057DD52B0C78}.Debug|amd64.Build.0 = Debug|x64 {6BF03EEA-200A-4698-9555-057DD52B0C78}.Debug|amd64.Build.0 = Debug|x64
{6BF03EEA-200A-4698-9555-057DD52B0C78}.Debug|arm64.ActiveCfg = Debug|ARM64
{6BF03EEA-200A-4698-9555-057DD52B0C78}.Debug|arm64.Build.0 = Debug|ARM64
{6BF03EEA-200A-4698-9555-057DD52B0C78}.Debug|IA-32.ActiveCfg = Debug|Win32 {6BF03EEA-200A-4698-9555-057DD52B0C78}.Debug|IA-32.ActiveCfg = Debug|Win32
{6BF03EEA-200A-4698-9555-057DD52B0C78}.Release|amd64.ActiveCfg = Release|x64 {6BF03EEA-200A-4698-9555-057DD52B0C78}.Release|amd64.ActiveCfg = Release|x64
{6BF03EEA-200A-4698-9555-057DD52B0C78}.Release|amd64.Build.0 = Release|x64 {6BF03EEA-200A-4698-9555-057DD52B0C78}.Release|amd64.Build.0 = Release|x64
{6BF03EEA-200A-4698-9555-057DD52B0C78}.Release|arm64.ActiveCfg = Release|ARM64
{6BF03EEA-200A-4698-9555-057DD52B0C78}.Release|arm64.Build.0 = Release|ARM64
{6BF03EEA-200A-4698-9555-057DD52B0C78}.Release|IA-32.ActiveCfg = Release|Win32 {6BF03EEA-200A-4698-9555-057DD52B0C78}.Release|IA-32.ActiveCfg = Release|Win32
{93FA47CC-7753-4F86-B583-69048F51C5AB}.Debug|amd64.ActiveCfg = Debug|x64
{93FA47CC-7753-4F86-B583-69048F51C5AB}.Debug|amd64.Build.0 = Debug|x64
{93FA47CC-7753-4F86-B583-69048F51C5AB}.Debug|arm64.ActiveCfg = Debug|ARM64
{93FA47CC-7753-4F86-B583-69048F51C5AB}.Debug|IA-32.ActiveCfg = Debug|Win32
{93FA47CC-7753-4F86-B583-69048F51C5AB}.Release|amd64.ActiveCfg = Release|x64
{93FA47CC-7753-4F86-B583-69048F51C5AB}.Release|amd64.Build.0 = Release|x64
{93FA47CC-7753-4F86-B583-69048F51C5AB}.Release|arm64.ActiveCfg = Release|ARM64
{93FA47CC-7753-4F86-B583-69048F51C5AB}.Release|IA-32.ActiveCfg = Release|Win32
{A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Debug|amd64.ActiveCfg = Debug|x64
{A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Debug|amd64.Build.0 = Debug|x64
{A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Debug|arm64.ActiveCfg = Debug|ARM64
{A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Debug|IA-32.ActiveCfg = Debug|Win32
{A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Release|amd64.ActiveCfg = Release|x64
{A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Release|amd64.Build.0 = Release|x64
{A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Release|arm64.ActiveCfg = Release|ARM64
{A66C5F27-DBF8-45A4-BDF3-BA54D8D82D0F}.Release|IA-32.ActiveCfg = Release|Win32
{2351A0DF-782C-4D74-85B7-0847D245D6B4}.Debug|amd64.ActiveCfg = Debug|x64
{2351A0DF-782C-4D74-85B7-0847D245D6B4}.Debug|amd64.Build.0 = Debug|x64
{2351A0DF-782C-4D74-85B7-0847D245D6B4}.Debug|arm64.ActiveCfg = Debug|ARM64
{2351A0DF-782C-4D74-85B7-0847D245D6B4}.Debug|arm64.Build.0 = Debug|ARM64
{2351A0DF-782C-4D74-85B7-0847D245D6B4}.Debug|IA-32.ActiveCfg = Debug|x64
{2351A0DF-782C-4D74-85B7-0847D245D6B4}.Release|amd64.ActiveCfg = Release|x64
{2351A0DF-782C-4D74-85B7-0847D245D6B4}.Release|amd64.Build.0 = Release|x64
{2351A0DF-782C-4D74-85B7-0847D245D6B4}.Release|arm64.ActiveCfg = Release|ARM64
{2351A0DF-782C-4D74-85B7-0847D245D6B4}.Release|arm64.Build.0 = Release|ARM64
{2351A0DF-782C-4D74-85B7-0847D245D6B4}.Release|IA-32.ActiveCfg = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

17
ExplorerPatcher/ArchiveMenu.c

@ -83,18 +83,8 @@ LRESULT CALLBACK ArchiveMenuWndProc(
_In_ UINT uMsg, _In_ UINT uMsg,
_In_ WPARAM wParam, _In_ WPARAM wParam,
_In_ LPARAM lParam, _In_ LPARAM lParam,
INT64(*ImmersiveContextMenuHelper_ApplyOwnerDrawToMenuFunc)( HRESULT(*ImmersiveContextMenuHelper_ApplyOwnerDrawToMenuFunc)(HMENU hMenu, HWND hWnd, POINT* pPt, unsigned int options, void* data),
HMENU h1, void(*ImmersiveContextMenuHelper_RemoveOwnerDrawFromMenuFunc)(HMENU hMenu, HWND hWnd)
HMENU h2,
HWND a3,
unsigned int a4,
void* data
),
void(*ImmersiveContextMenuHelper_RemoveOwnerDrawFromMenuFunc)(
HMENU _this,
HMENU hWnd,
HWND a3
)
) )
{ {
LRESULT result; LRESULT result;
@ -145,8 +135,7 @@ LRESULT CALLBACK ArchiveMenuWndProc(
ImmersiveContextMenuHelper_RemoveOwnerDrawFromMenuFunc( ImmersiveContextMenuHelper_RemoveOwnerDrawFromMenuFunc(
hMenu, hMenu,
hWnd, hWnd
&(pt)
); );
free(unknown_array); free(unknown_array);
SetForegroundWindow(prevhWnd); SetForegroundWindow(prevhWnd);

24
ExplorerPatcher/ArchiveMenu.h

@ -4,6 +4,10 @@
#include <Windows.h> #include <Windows.h>
#include <Shlobj_core.h> #include <Shlobj_core.h>
#ifdef __cplusplus
extern "C" {
#endif
#define OPEN_NAME L"&Open archive" #define OPEN_NAME L"&Open archive"
#define EXTRACT_NAME L"&Extract to \"%s\\\"" #define EXTRACT_NAME L"&Extract to \"%s\\\""
#define OPEN_CMD L"\"C:\\Program Files\\7-Zip\\7zFM.exe\" %s" #define OPEN_CMD L"\"C:\\Program Files\\7-Zip\\7zFM.exe\" %s"
@ -26,7 +30,7 @@ typedef struct _ArchiveMenuThreadParams
WNDPROC wndProc; WNDPROC wndProc;
HWND(WINAPI* CreateWindowInBand)( HWND(WINAPI* CreateWindowInBand)(
_In_ DWORD dwExStyle, _In_ DWORD dwExStyle,
_In_opt_ ATOM atom, _In_opt_ LPCWSTR lpClassName,
_In_opt_ LPCWSTR lpWindowName, _In_opt_ LPCWSTR lpWindowName,
_In_ DWORD dwStyle, _In_ DWORD dwStyle,
_In_ int X, _In_ int X,
@ -47,18 +51,12 @@ LRESULT CALLBACK ArchiveMenuWndProc(
_In_ UINT uMsg, _In_ UINT uMsg,
_In_ WPARAM wParam, _In_ WPARAM wParam,
_In_ LPARAM lParam, _In_ LPARAM lParam,
INT64(*ImmersiveContextMenuHelper_ApplyOwnerDrawToMenuFunc)( HRESULT(*ImmersiveContextMenuHelper_ApplyOwnerDrawToMenuFunc)(HMENU hMenu, HWND hWnd, POINT* pPt, unsigned int options, void* data),
HMENU h1, void(*ImmersiveContextMenuHelper_RemoveOwnerDrawFromMenuFunc)(HMENU hMenu, HWND hWnd)
HMENU h2,
HWND a3,
unsigned int a4,
void* data
),
void(*ImmersiveContextMenuHelper_RemoveOwnerDrawFromMenuFunc)(
HMENU _this,
HMENU hWnd,
HWND a3
)
); );
#ifdef __cplusplus
}
#endif
#endif #endif

BIN
ExplorerPatcher/ExplorerPatcher.rc

Binary file not shown.

325
ExplorerPatcher/ExplorerPatcher.vcxproj

@ -5,18 +5,34 @@
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32"> <ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>Win32</Platform> <Platform>Win32</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64"> <ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64EC">
<Configuration>Debug</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64EC">
<Configuration>Release</Configuration>
<Platform>ARM64EC</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion> <VCProjectVersion>16.0</VCProjectVersion>
@ -24,31 +40,19 @@
<RootNamespace>CenterTitlebarTextLibrary</RootNamespace> <RootNamespace>CenterTitlebarTextLibrary</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>ExplorerPatcher</ProjectName> <ProjectName>ExplorerPatcher</ProjectName>
<WithArm64XBinaries>false</WithArm64XBinaries>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType> <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
@ -57,242 +61,203 @@
</ImportGroup> </ImportGroup>
<ImportGroup Label="Shared"> <ImportGroup Label="Shared">
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
<TargetName>ExplorerPatcher.amd64</TargetName> <TargetName>ExplorerPatcher.IA-32</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
<TargetName>ExplorerPatcher.IA-32</TargetName> <TargetName>ExplorerPatcher.IA-32</TargetName>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
<TargetName>ExplorerPatcher.amd64</TargetName> <TargetName>ExplorerPatcher.amd64</TargetName>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <WithMainPatcher>true</WithMainPatcher>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
<TargetName>ExplorerPatcher.amd64</TargetName>
<WithMainPatcher>true</WithMainPatcher>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<TargetName>ExplorerPatcher.IA-32</TargetName> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <TargetName>ExplorerPatcher.arm64</TargetName>
<WithMainPatcher>true</WithMainPatcher>
<BuildAsX>$(WithArm64XBinaries)</BuildAsX>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
<TargetName>ExplorerPatcher.arm64</TargetName>
<WithMainPatcher>true</WithMainPatcher>
<BuildAsX>$(WithArm64XBinaries)</BuildAsX>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64EC'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
<TargetName>ExplorerPatcher.arm64ec</TargetName>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64EC'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
<TargetName>ExplorerPatcher.arm64ec</TargetName>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck> <SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)libs\funchook\include;$(SolutionDir)libs\libvalinet;$(SolutionDir)libs\funchook\distorm\include;$(SolutionDir)libs\Detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>inc;$(SolutionDir)libs\libvalinet;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <LanguageStandard>stdcpp20</LanguageStandard>
<CallingConvention>Cdecl</CallingConvention> <UseFullPaths>false</UseFullPaths>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem> <SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build\Release\;$(SolutionDir)libs\Detours\lib.X64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <DelayLoadDLLs>Winmm.dll</DelayLoadDLLs>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<ForcedIncludeFiles>$(SolutionDir)debug.h</ForcedIncludeFiles>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck> <PreprocessorDefinitions>NDEBUG;WINRT_NO_SOURCE_LOCATION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)libs\funchook\include;$(SolutionDir)libs\libvalinet;$(SolutionDir)libs\funchook\distorm\include;$(SolutionDir)libs\Detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<CallingConvention>StdCall</CallingConvention>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build\Release\;$(SolutionDir)libs\Detours\lib.X64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link> </Link>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <CallingConvention>StdCall</CallingConvention>
<SDLCheck>true</SDLCheck> </ClCompile>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ItemDefinitionGroup>
<ConformanceMode>true</ConformanceMode> <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
<AdditionalIncludeDirectories>$(SolutionDir)libs\funchook\include;$(SolutionDir)libs\libvalinet;$(SolutionDir)libs\funchook\distorm\include;$(SolutionDir)libs\Detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <ClCompile>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <PreprocessorDefinitions>WITH_MAIN_PATCHER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CallingConvention>Cdecl</CallingConvention> <CallingConvention>Cdecl</CallingConvention>
<ForcedIncludeFiles>$(SolutionDir)debug.h</ForcedIncludeFiles>
</ClCompile> </ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build\Release\;$(SolutionDir)libs\Detours\lib.X64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Platform)'=='ARM64'">
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <PreprocessorDefinitions>WITH_MAIN_PATCHER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck> <CallingConvention>Cdecl</CallingConvention>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile>
<ConformanceMode>true</ConformanceMode> </ItemDefinitionGroup>
<AdditionalIncludeDirectories>$(SolutionDir)libs\funchook\include;$(SolutionDir)libs\libvalinet;$(SolutionDir)libs\funchook\distorm\include;$(SolutionDir)libs\Detours\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <ItemDefinitionGroup Condition="'$(Platform)'=='ARM64EC'">
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <ClCompile>
<CallingConvention>StdCall</CallingConvention> <CallingConvention>Cdecl</CallingConvention>
<ForcedIncludeFiles>$(SolutionDir)debug.h</ForcedIncludeFiles>
</ClCompile> </ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\funchook\build\Release\;$(SolutionDir)libs\Detours\lib.X64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
<PreBuildEvent>
<Command>
</Command>
</PreBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_error.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_error.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_IconPainter.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_IconPainter.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_RegistryMonitor.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_RegistryMonitor.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_tshwnd.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_tshwnd.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_vector.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_vector.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_window.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_window.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_WindowHelpers.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_WindowHelpers.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_WindowSwitcher.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_WindowSwitcher.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_WindowSwitcherLayout.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_WindowSwitcherLayout.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_WindowSwitcherLayoutWindow.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_WindowSwitcherLayoutWindow.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="ArchiveMenu.c"> <ClCompile Include="ArchiveMenu.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="dllmain.c" /> <ClCompile Include="dllmain.c" />
<ClCompile Include="fmemopen.c" /> <ClCompile Include="fmemopen.c" />
<ClCompile Include="getline.c" /> <ClCompile Include="getline.c" />
<ClCompile Include="GUI.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="HideExplorerSearchBar.c" /> <ClCompile Include="HideExplorerSearchBar.c" />
<ClCompile Include="ImmersiveFlyouts.c"> <ClCompile Include="ImmersiveFlyouts.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> </ClCompile>
<ClCompile Include="InputSwitch.cpp">
<ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="Localization.cpp" />
<ClCompile Include="lvt.c"> <ClCompile Include="lvt.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="SettingsMonitor.c" /> <ClCompile Include="SettingsMonitor.c" />
<ClCompile Include="StartMenu.c"> <ClCompile Include="StartMenu.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="StartupSound.c"> <ClCompile Include="StartMenuSettings.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="StartupSound.cpp" />
<ClCompile Include="symbols.c"> <ClCompile Include="symbols.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="TaskbarCenter.c"> <ClCompile Include="Taskbar10.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="updates.c"> <ClCompile Include="TaskbarCenter.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> </ClCompile>
</ExcludedFromBuild> <ClCompile Include="TwinUIPatches.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="updates.cpp">
<ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
<ClCompile Include="utility.c"> <ClCompile Include="utility.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(WithMainPatcher)'!='true'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -314,11 +279,13 @@
<ClInclude Include="dxgi_imp.h" /> <ClInclude Include="dxgi_imp.h" />
<ClInclude Include="fmemopen.h" /> <ClInclude Include="fmemopen.h" />
<ClInclude Include="getline.h" /> <ClInclude Include="getline.h" />
<ClInclude Include="GUI.h" />
<ClInclude Include="HideExplorerSearchBar.h" /> <ClInclude Include="HideExplorerSearchBar.h" />
<ClInclude Include="hooking.h" /> <ClInclude Include="hooking.h" />
<ClInclude Include="ep_private.h" /> <ClInclude Include="ep_private.h" />
<ClInclude Include="ImmersiveColor.h" />
<ClInclude Include="ImmersiveFlyouts.h" /> <ClInclude Include="ImmersiveFlyouts.h" />
<ClInclude Include="InputSwitch.h" />
<ClInclude Include="Localization.h" />
<ClInclude Include="lvt.h" /> <ClInclude Include="lvt.h" />
<ClInclude Include="osutility.h" /> <ClInclude Include="osutility.h" />
<ClInclude Include="queryversion.h" /> <ClInclude Include="queryversion.h" />
@ -330,15 +297,29 @@
<ClInclude Include="TaskbarCenter.h" /> <ClInclude Include="TaskbarCenter.h" />
<ClInclude Include="updates.h" /> <ClInclude Include="updates.h" />
<ClInclude Include="utility.h" /> <ClInclude Include="utility.h" />
<ClInclude Include="inc\ContainerPolicies.h" />
<ClInclude Include="inc\memsafe.h" />
<ClInclude Include="inc\NativeString.h" />
<ClInclude Include="inc\RefCountedObject.h" />
<ClInclude Include="inc\ResultUtils.h" />
<ClInclude Include="inc\SimpleArray.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="ExplorerPatcher.rc" /> <ResourceCompile Include="ExplorerPatcher.rc" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="settings.reg" /> <None Include="packages.config" />
<None Include="settings10.reg" />
</ItemGroup> </ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
<Import Project="..\packages\KNSoft.SlimDetours.1.1.4-beta\build\KNSoft.SlimDetours.targets" Condition="Exists('..\packages\KNSoft.SlimDetours.1.1.4-beta\build\KNSoft.SlimDetours.targets')" />
</ImportGroup> </ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.ImplementationLibrary.1.0.250325.1\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
<Error Condition="!Exists('..\packages\KNSoft.SlimDetours.1.1.4-beta\build\KNSoft.SlimDetours.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\KNSoft.SlimDetours.1.1.4-beta\build\KNSoft.SlimDetours.targets'))" />
</Target>
</Project> </Project>

76
ExplorerPatcher/ExplorerPatcher.vcxproj.filters

@ -60,9 +60,6 @@
<ClInclude Include="utility.h"> <ClInclude Include="utility.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="GUI.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="TaskbarCenter.h"> <ClInclude Include="TaskbarCenter.h">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
@ -132,6 +129,33 @@
<ClInclude Include="osutility.h"> <ClInclude Include="osutility.h">
<Filter>Header Files\internal</Filter> <Filter>Header Files\internal</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="ImmersiveColor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="InputSwitch.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Localization.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="inc\ContainerPolicies.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="inc\memsafe.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="inc\NativeString.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="inc\RefCountedObject.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="inc\ResultUtils.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="inc\SimpleArray.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="ExplorerPatcher.rc"> <ResourceCompile Include="ExplorerPatcher.rc">
@ -145,9 +169,6 @@
<ClCompile Include="ArchiveMenu.c"> <ClCompile Include="ArchiveMenu.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="StartupSound.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SettingsMonitor.c"> <ClCompile Include="SettingsMonitor.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
@ -157,16 +178,13 @@
<ClCompile Include="StartMenu.c"> <ClCompile Include="StartMenu.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="symbols.c"> <ClCompile Include="StartMenuSettings.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="utility.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="GUI.c"> <ClCompile Include="symbols.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="TaskbarCenter.c"> <ClCompile Include="utility.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="fmemopen.c"> <ClCompile Include="fmemopen.c">
@ -199,9 +217,6 @@
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_window.c"> <ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_window.c">
<Filter>Source Files\sws</Filter> <Filter>Source Files\sws</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="updates.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ImmersiveFlyouts.c"> <ClCompile Include="ImmersiveFlyouts.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
@ -214,13 +229,32 @@
<ClCompile Include="lvt.c"> <ClCompile Include="lvt.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="InputSwitch.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Localization.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="StartupSound.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Taskbar10.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TaskbarCenter.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TwinUIPatches.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="updates.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="settings.reg"> <Natvis Include="$(MSBuildThisFileDirectory)..\..\natvis\wil.natvis" />
<Filter>Settings</Filter>
</None>
<None Include="settings10.reg">
<Filter>Settings</Filter>
</None>
</ItemGroup> </ItemGroup>
</Project> </Project>

15
ExplorerPatcher/HideExplorerSearchBar.c

@ -103,19 +103,14 @@ LRESULT CALLBACK HideExplorerSearchBarSubClass(
DWORD_PTR dwRefData DWORD_PTR dwRefData
) )
{ {
switch (uMsg) if (uMsg == WM_SIZE || uMsg == WM_PARENTNOTIFY)
{ {
case WM_PARENTNOTIFY: if (uMsg == WM_SIZE && IsWindows11Version22H2OrHigher()) HideExplorerSearchBar(hWnd);
if ((WORD)wParam == 1) else if (uMsg == WM_PARENTNOTIFY && (WORD)wParam == 1) HideExplorerSearchBar(hWnd);
{
HideExplorerSearchBar(hWnd);
} }
break; else if (uMsg == WM_DESTROY)
{
case WM_DESTROY:
RemoveWindowSubclass(hWnd, HideExplorerSearchBarSubClass, (UINT_PTR)HideExplorerSearchBarSubClass); RemoveWindowSubclass(hWnd, HideExplorerSearchBarSubClass, (UINT_PTR)HideExplorerSearchBarSubClass);
break;
} }
return DefSubclassProc(hWnd, uMsg, wParam, lParam); return DefSubclassProc(hWnd, uMsg, wParam, lParam);
} }

1
ExplorerPatcher/HideExplorerSearchBar.h

@ -3,6 +3,7 @@
#include <Windows.h> #include <Windows.h>
#include <commctrl.h> #include <commctrl.h>
#pragma comment(lib, "Comctl32.lib") #pragma comment(lib, "Comctl32.lib")
#include "osutility.h"
// https://stackoverflow.com/questions/30141592/how-do-i-find-a-handle-inside-a-control // https://stackoverflow.com/questions/30141592/how-do-i-find-a-handle-inside-a-control
HWND FindChildWindow( HWND FindChildWindow(

39
ExplorerPatcher/ImmersiveColor.h

@ -0,0 +1,39 @@
#pragma once
#include <Windows.h>
#include "utility.h"
class CImmersiveColor
{
public:
static DWORD GetColor(IMMERSIVE_COLOR_TYPE colorType)
{
IMMERSIVE_COLOR_PREFERENCE icp;
icp.crStartColor = 0;
icp.crAccentColor = 0;
GetUserColorPreference(&icp, false/*, true*/);
return GetColorFromPreference(&icp, colorType, false, IHCM_REFRESH);
}
static bool IsColorSchemeChangeMessage(UINT uMsg, LPARAM lParam)
{
bool bRet = false;
if (uMsg == WM_SETTINGCHANGE && lParam && CompareStringOrdinal((WCHAR*)lParam, -1, L"ImmersiveColorSet", -1, TRUE) == CSTR_EQUAL)
{
RefreshImmersiveColorPolicyState();
bRet = true;
}
GetIsImmersiveColorUsingHighContrast(IHCM_REFRESH);
return bRet;
}
};
class CImmersiveColorImpl
{
public:
static HRESULT GetColorPreferenceImpl(IMMERSIVE_COLOR_PREFERENCE* pcpPreference, bool fForceReload, bool fUpdateCached)
{
return GetUserColorPreference(pcpPreference, fForceReload);
}
};

23
ExplorerPatcher/ImmersiveFlyouts.c

@ -56,7 +56,7 @@ void InvokeActionCenter()
} }
} }
void InvokeFlyout(BOOL bAction, DWORD dwWhich) HRESULT InvokeFlyoutRect(BOOL bAction, DWORD dwWhich, __x_ABI_CWindows_CFoundation_CRect* pRc)
{ {
HRESULT hr = S_OK; HRESULT hr = S_OK;
IUnknown* pImmersiveShell = NULL; IUnknown* pImmersiveShell = NULL;
@ -70,13 +70,13 @@ void InvokeFlyout(BOOL bAction, DWORD dwWhich)
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
IShellExperienceManagerFactory* pShellExperienceManagerFactory = NULL; IShellExperienceManagerFactory* pShellExperienceManagerFactory = NULL;
IUnknown_QueryService( hr = IUnknown_QueryService(
pImmersiveShell, pImmersiveShell,
&CLSID_ShellExperienceManagerFactory, &CLSID_ShellExperienceManagerFactory,
&CLSID_ShellExperienceManagerFactory, &CLSID_ShellExperienceManagerFactory,
&pShellExperienceManagerFactory &pShellExperienceManagerFactory
); );
if (pShellExperienceManagerFactory) if (SUCCEEDED(hr))
{ {
HSTRING_HEADER hstringHeader; HSTRING_HEADER hstringHeader;
HSTRING hstring = NULL; HSTRING hstring = NULL;
@ -102,18 +102,18 @@ void InvokeFlyout(BOOL bAction, DWORD dwWhich)
&hstringHeader, &hstringHeader,
&hstring &hstring
); );
if (hstring) if (SUCCEEDED(hr))
{ {
IUnknown* pIntf = NULL; IUnknown* pIntf = NULL;
pShellExperienceManagerFactory->lpVtbl->GetExperienceManager( hr = pShellExperienceManagerFactory->lpVtbl->GetExperienceManager(
pShellExperienceManagerFactory, pShellExperienceManagerFactory,
hstring, hstring,
&pIntf &pIntf
); );
if (pIntf) if (SUCCEEDED(hr))
{ {
IExperienceManager* pExperienceManager = NULL; IExperienceManager* pExperienceManager = NULL;
pIntf->lpVtbl->QueryInterface( hr = pIntf->lpVtbl->QueryInterface(
pIntf, pIntf,
dwWhich == INVOKE_FLYOUT_NETWORK ? &IID_NetworkFlyoutExperienceManager : dwWhich == INVOKE_FLYOUT_NETWORK ? &IID_NetworkFlyoutExperienceManager :
(dwWhich == INVOKE_FLYOUT_CLOCK ? &IID_TrayClockFlyoutExperienceManager : (dwWhich == INVOKE_FLYOUT_CLOCK ? &IID_TrayClockFlyoutExperienceManager :
@ -121,17 +121,15 @@ void InvokeFlyout(BOOL bAction, DWORD dwWhich)
(dwWhich == INVOKE_FLYOUT_SOUND ? &IID_TrayMtcUvcFlyoutExperienceManager : &IID_IUnknown))), (dwWhich == INVOKE_FLYOUT_SOUND ? &IID_TrayMtcUvcFlyoutExperienceManager : &IID_IUnknown))),
&pExperienceManager &pExperienceManager
); );
if (pExperienceManager) if (SUCCEEDED(hr))
{ {
RECT rc;
SetRect(&rc, 0, 0, 0, 0);
if (bAction == INVOKE_FLYOUT_SHOW) if (bAction == INVOKE_FLYOUT_SHOW)
{ {
pExperienceManager->lpVtbl->ShowFlyout(pExperienceManager, &rc, NULL); hr = pExperienceManager->lpVtbl->ShowFlyout(pExperienceManager, pRc);
} }
else if (bAction == INVOKE_FLYOUT_HIDE) else if (bAction == INVOKE_FLYOUT_HIDE)
{ {
pExperienceManager->lpVtbl->HideFlyout(pExperienceManager); hr = pExperienceManager->lpVtbl->HideFlyout(pExperienceManager);
} }
pExperienceManager->lpVtbl->Release(pExperienceManager); pExperienceManager->lpVtbl->Release(pExperienceManager);
} }
@ -143,4 +141,5 @@ void InvokeFlyout(BOOL bAction, DWORD dwWhich)
} }
pImmersiveShell->lpVtbl->Release(pImmersiveShell); pImmersiveShell->lpVtbl->Release(pImmersiveShell);
} }
return hr;
} }

14
ExplorerPatcher/ImmersiveFlyouts.h

@ -57,8 +57,7 @@ typedef struct IExperienceManagerVtbl // : IInspectable
HRESULT(STDMETHODCALLTYPE* ShowFlyout)( HRESULT(STDMETHODCALLTYPE* ShowFlyout)(
IExperienceManager* This, IExperienceManager* This,
/* [in] */ RECT* rect, /* [in] */ __x_ABI_CWindows_CFoundation_CRect* rect);
/* [in] */ HWND hWnd);
HRESULT(STDMETHODCALLTYPE* HideFlyout)( HRESULT(STDMETHODCALLTYPE* HideFlyout)(
IExperienceManager* This); IExperienceManager* This);
@ -192,5 +191,14 @@ void InvokeActionCenter();
#define INVOKE_FLYOUT_CLOCK 2 #define INVOKE_FLYOUT_CLOCK 2
#define INVOKE_FLYOUT_BATTERY 3 #define INVOKE_FLYOUT_BATTERY 3
#define INVOKE_FLYOUT_SOUND 4 #define INVOKE_FLYOUT_SOUND 4
void InvokeFlyout(BOOL bAction, DWORD dwWhich);
HRESULT InvokeFlyoutRect(BOOL bAction, DWORD dwWhich, __x_ABI_CWindows_CFoundation_CRect* pRc);
inline HRESULT InvokeFlyout(BOOL bAction, DWORD dwWhich)
{
__x_ABI_CWindows_CFoundation_CRect rc;
ZeroMemory(&rc, sizeof(rc));
return InvokeFlyoutRect(bAction, dwWhich, &rc);
}
#endif #endif

198
ExplorerPatcher/InputSwitch.cpp

@ -0,0 +1,198 @@
#include "InputSwitch.h"
#include <shellscalingapi.h>
#include <wrl/implements.h>
#include <wil/result_macros.h>
#define TB_POS_NOWHERE 0
#define TB_POS_BOTTOM 1
#define TB_POS_TOP 2
#define TB_POS_LEFT 3
#define TB_POS_RIGHT 4
extern "C" UINT GetTaskbarLocationAndSize(POINT ptCursor, RECT* rc);
extern "C" INPUT_SWITCH_IDL_CLIENT_TYPE dwIMEStyle;
extern "C" HRESULT CInputSwitchControl_ModifyAnchor(UINT dwNumberOfProfiles, RECT* lpRect);
HRESULT CInputSwitchControl_ModifyAnchor(UINT dwNumberOfProfiles, RECT* lpRect)
{
if (!dwIMEStyle) // impossible case (this is not called for the Windows 11 language switcher), but just in case
{
return S_FALSE;
}
HWND hWndTaskbar = FindWindowW(L"Shell_TrayWnd", NULL);
UINT dpiX = 96, dpiY = 96;
HRESULT hr = GetDpiForMonitor(
MonitorFromWindow(hWndTaskbar, MONITOR_DEFAULTTOPRIMARY),
MDT_DEFAULT,
&dpiX,
&dpiY
);
double dpix = dpiX / 96.0;
double dpiy = dpiY / 96.0;
//printf("RECT %d %d %d %d - %d %d\n", lpRect->left, lpRect->right, lpRect->top, lpRect->bottom, dwNumberOfProfiles, a3);
RECT rc;
GetWindowRect(hWndTaskbar, &rc);
POINT pt;
pt.x = rc.left;
pt.y = rc.top;
UINT tbPos = GetTaskbarLocationAndSize(pt, &rc);
if (tbPos == TB_POS_BOTTOM)
{
}
else if (tbPos == TB_POS_TOP)
{
if (dwIMEStyle == 1) // Windows 10 (with Language preferences link)
{
lpRect->top = rc.top + (rc.bottom - rc.top) + (UINT)(((double)dwNumberOfProfiles * (60.0 * dpiy)) + (5.0 * dpiy * 4.0) + (dpiy) + (48.0 * dpiy));
}
else if (dwIMEStyle == 2 || dwIMEStyle == 3 || dwIMEStyle == 4 || dwIMEStyle == 5) // LOGONUI, UAC, Windows 10, OOBE
{
lpRect->top = rc.top + (rc.bottom - rc.top) + (UINT)(((double)dwNumberOfProfiles * (60.0 * dpiy)) + (5.0 * dpiy * 2.0));
}
}
else if (tbPos == TB_POS_LEFT)
{
if (dwIMEStyle == 1 || dwIMEStyle == 2 || dwIMEStyle == 3 || dwIMEStyle == 4 || dwIMEStyle == 5)
{
lpRect->right = rc.left + (rc.right - rc.left) + (UINT)((double)(300.0 * dpix));
lpRect->top += (lpRect->bottom - lpRect->top);
}
}
if (tbPos == TB_POS_RIGHT)
{
if (dwIMEStyle == 1 || dwIMEStyle == 2 || dwIMEStyle == 3 || dwIMEStyle == 4 || dwIMEStyle == 5)
{
lpRect->right = lpRect->right - (rc.right - rc.left);
lpRect->top += (lpRect->bottom - lpRect->top);
}
}
if (dwIMEStyle == 4)
{
lpRect->right -= (UINT)((double)(300.0 * dpix)) - (lpRect->right - lpRect->left);
}
return S_OK;
}
class CInputSwitchControlProxy : public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, IInputSwitchControl>
{
public:
CInputSwitchControlProxy()
: m_type((INPUT_SWITCH_IDL_CLIENT_TYPE)-1)
{
}
HRESULT RuntimeClassInitialize(IInputSwitchControl* original)
{
m_original = original;
return S_OK;
}
STDMETHODIMP Init(INPUT_SWITCH_IDL_CLIENT_TYPE type) override
{
m_type = type;
return m_original->Init(type == ISCT_IDL_DESKTOP && dwIMEStyle != ISCT_IDL_DESKTOP ? dwIMEStyle : type);
}
STDMETHODIMP ShowInputSwitch(const RECT* rect) override
{
RECT myRect = *rect;
if (m_type == ISCT_IDL_DESKTOP)
{
UINT dwNumberOfProfiles = 0;
BOOL bImePresent = FALSE;
m_original->GetProfileCount(&dwNumberOfProfiles, &bImePresent);
CInputSwitchControl_ModifyAnchor(dwNumberOfProfiles, &myRect);
}
return m_original->ShowInputSwitch(&myRect);
}
STDMETHODIMP SetCallback(IInputSwitchCallback* callback) override { return m_original->SetCallback(callback); }
STDMETHODIMP GetProfileCount(UINT* count, BOOL* bOutImePresent) override { return m_original->GetProfileCount(count, bOutImePresent); }
STDMETHODIMP GetCurrentProfile(INPUT_SWITCH_IDL_PROFILE_DATA* data) override { return m_original->GetCurrentProfile(data); }
STDMETHODIMP RegisterHotkeys() override { return m_original->RegisterHotkeys(); }
STDMETHODIMP ClickImeModeItem(INPUT_SWITCH_IDL_IME_CLICK_TYPE type, POINT point, const RECT* rect) override { return m_original->ClickImeModeItem(type, point, rect); }
STDMETHODIMP ForceHide() override { return m_original->ForceHide(); }
STDMETHODIMP ShowTouchKeyboardInputSwitch(const RECT* rect, INPUT_SWITCH_IDL_ALIGNMENT align, int a3, DWORD a4, INPUT_SWITCH_IDL_MODALITY a5) override { return m_original->ShowTouchKeyboardInputSwitch(rect, align, a3, a4, a5); }
STDMETHODIMP GetContextFlags(DWORD* flags) override { return m_original->GetContextFlags(flags); }
STDMETHODIMP SetContextOverrideMode(INPUT_SWITCH_IDL_CFOM mode) override { return m_original->SetContextOverrideMode(mode); }
STDMETHODIMP GetCurrentImeModeItem(INPUT_SWITCH_IDL_IME_MODE_ITEM_DATA* data) override { return m_original->GetCurrentImeModeItem(data); }
STDMETHODIMP ActivateInputProfile(const WCHAR* profile) override { return m_original->ActivateInputProfile(profile); }
STDMETHODIMP SetUserSid(const WCHAR* sid) override { return m_original->SetUserSid(sid); }
private:
Microsoft::WRL::ComPtr<IInputSwitchControl> m_original;
INPUT_SWITCH_IDL_CLIENT_TYPE m_type;
};
HRESULT CInputSwitchControlProxy_CreateInstance(IInputSwitchControl* original, REFIID riid, void** ppvObject)
{
Microsoft::WRL::ComPtr<CInputSwitchControlProxy> proxy;
RETURN_IF_FAILED(Microsoft::WRL::MakeAndInitialize<CInputSwitchControlProxy>(&proxy, original));
RETURN_HR(proxy.CopyTo(riid, ppvObject));
}
class CInputSwitchControlProxySV2 : public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, IInputSwitchControlSV2>
{
public:
CInputSwitchControlProxySV2()
: m_type((INPUT_SWITCH_IDL_CLIENT_TYPE)-1)
{
}
HRESULT RuntimeClassInitialize(IInputSwitchControlSV2* original)
{
m_original = original;
return S_OK;
}
STDMETHODIMP Init(INPUT_SWITCH_IDL_CLIENT_TYPE type) override
{
m_type = type;
return m_original->Init(type == ISCT_IDL_DESKTOP && dwIMEStyle != ISCT_IDL_DESKTOP ? dwIMEStyle : type);
}
STDMETHODIMP ShowInputSwitch(const RECT* rect) override
{
RECT myRect = *rect;
if (m_type == ISCT_IDL_DESKTOP)
{
UINT dwNumberOfProfiles = 0;
BOOL bImePresent = FALSE;
m_original->GetProfileCount(&dwNumberOfProfiles, &bImePresent);
CInputSwitchControl_ModifyAnchor(dwNumberOfProfiles, &myRect);
}
return m_original->ShowInputSwitch(&myRect);
}
STDMETHODIMP SetCallback(IInputSwitchCallback* callback) override { return m_original->SetCallback(callback); }
STDMETHODIMP GetProfileCount(UINT* count, BOOL* bOutImePresent) override { return m_original->GetProfileCount(count, bOutImePresent); }
STDMETHODIMP GetCurrentProfile(INPUT_SWITCH_IDL_PROFILE_DATA* data) override { return m_original->GetCurrentProfile(data); }
STDMETHODIMP RegisterHotkeys() override { return m_original->RegisterHotkeys(); }
STDMETHODIMP ClickImeModeItem(INPUT_SWITCH_IDL_IME_CLICK_TYPE type, POINT point, const RECT* rect) override { return m_original->ClickImeModeItem(type, point, rect); }
STDMETHODIMP ClickImeModeItemWithAnchor(INPUT_SWITCH_IDL_IME_CLICK_TYPE type, IUnknown* anchor) override { return m_original->ClickImeModeItemWithAnchor(type, anchor); }
STDMETHODIMP ForceHide() override { return m_original->ForceHide(); }
STDMETHODIMP ShowTouchKeyboardInputSwitch(const RECT* rect, INPUT_SWITCH_IDL_ALIGNMENT align, int a3, DWORD a4, INPUT_SWITCH_IDL_MODALITY a5) override { return m_original->ShowTouchKeyboardInputSwitch(rect, align, a3, a4, a5); }
STDMETHODIMP GetContextFlags(DWORD* flags) override { return m_original->GetContextFlags(flags); }
STDMETHODIMP SetContextOverrideMode(INPUT_SWITCH_IDL_CFOM mode) override { return m_original->SetContextOverrideMode(mode); }
STDMETHODIMP GetCurrentImeModeItem(INPUT_SWITCH_IDL_IME_MODE_ITEM_DATA* data) override { return m_original->GetCurrentImeModeItem(data); }
STDMETHODIMP ActivateInputProfile(const WCHAR* profile) override { return m_original->ActivateInputProfile(profile); }
STDMETHODIMP SetUserSid(const WCHAR* sid) override { return m_original->SetUserSid(sid); }
private:
Microsoft::WRL::ComPtr<IInputSwitchControlSV2> m_original;
INPUT_SWITCH_IDL_CLIENT_TYPE m_type;
};
HRESULT CInputSwitchControlProxySV2_CreateInstance(IInputSwitchControlSV2* original, REFIID riid, void** ppvObject)
{
Microsoft::WRL::ComPtr<CInputSwitchControlProxySV2> proxy;
RETURN_IF_FAILED(Microsoft::WRL::MakeAndInitialize<CInputSwitchControlProxySV2>(&proxy, original));
RETURN_HR(proxy.CopyTo(riid, ppvObject));
}

125
ExplorerPatcher/InputSwitch.h

@ -0,0 +1,125 @@
#pragma once
#include <Windows.h>
DEFINE_GUID(CLSID_InputSwitchControl, 0xb9bc2a50, 0x43c3, 0x41aa, 0xa0, 0x86, 0x5d, 0xb1, 0x4e, 0x18, 0x4b, 0xae);
DEFINE_GUID(IID_IInputSwitchControl, 0xb9bc2a50, 0x43c3, 0x41aa, 0xa0, 0x82, 0x5d, 0xb1, 0x4e, 0x18, 0x4b, 0xae);
typedef enum __MIDL___MIDL_itf_inputswitchserver_0000_0000_0001
{
ISCT_IDL_DESKTOP,
ISCT_IDL_TOUCHKEYBOARD,
ISCT_IDL_LOGONUI,
ISCT_IDL_UAC,
ISCT_IDL_SETTINGSPANE,
ISCT_IDL_OOBE,
ISCT_IDL_USEROOBE
} INPUT_SWITCH_IDL_CLIENT_TYPE;
typedef struct __MIDL___MIDL_itf_inputswitchserver_0000_0000_0002
{
int dummy; // We don't need its contents
} INPUT_SWITCH_IDL_PROFILE_DATA;
typedef struct __MIDL___MIDL_itf_inputswitchserver_0000_0000_0003
{
WCHAR* pszTooltip;
HICON hIcon;
BOOL fDisabled;
BOOL fHidden;
WCHAR* pszIconGlyph;
void* pUnk1; // @Note: Added in 22621.4974
} INPUT_SWITCH_IDL_IME_MODE_ITEM_DATA;
typedef enum __MIDL___MIDL_itf_inputswitchserver_0000_0000_0004
{
INPUT_SWITCH_IDL_IME_CLICK_TYPE_LEFT,
INPUT_SWITCH_IDL_IME_CLICK_TYPE_RIGHT,
INPUT_SWITCH_IDL_IME_CLICK_TYPE_LEFT_DISABLED
} INPUT_SWITCH_IDL_IME_CLICK_TYPE;
typedef enum __MIDL___MIDL_itf_inputswitchserver_0000_0000_0005
{
INPUT_SWITCH_IDL_MODALITY_STANDARDKEYBOARD = 0x1,
INPUT_SWITCH_IDL_MODALITY_SPLITKEYBOARD = 0x2,
INPUT_SWITCH_IDL_MODALITY_CLASSICKEYBOARD = 0x4,
INPUT_SWITCH_IDL_MODALITY_HANDWRITING = 0x8,
INPUT_SWITCH_IDL_MODALITY_HIDE = 0x10,
INPUT_SWITCH_IDL_MODALITY_ONEHANDEDKEYBOARD = 0x20,
} INPUT_SWITCH_IDL_MODALITY;
DEFINE_ENUM_FLAG_OPERATORS(INPUT_SWITCH_IDL_MODALITY);
typedef enum __MIDL___MIDL_itf_inputswitchserver_0000_0000_0006
{
INPUT_SWITCH_IDL_ALIGN_DEFAULT,
INPUT_SWITCH_IDL_ALIGN_RIGHT_EDGE,
INPUT_SWITCH_IDL_ALIGN_LEFT_EDGE,
} INPUT_SWITCH_IDL_ALIGNMENT;
typedef enum __MIDL___MIDL_itf_inputswitchserver_0000_0000_0008
{
INPUT_SWITCH_IDL_CFOM_NO_OVERRIDE,
INPUT_SWITCH_IDL_CFOM_DESKTOP,
INPUT_SWITCH_IDL_CFOM_IMMERSIVE,
} INPUT_SWITCH_IDL_CFOM;
interface IInputSwitchCallback;
#ifdef __cplusplus
MIDL_INTERFACE("b9bc2a50-43c3-41aa-a082-5db14e184bae")
IInputSwitchControl : IUnknown
{
virtual HRESULT STDMETHODCALLTYPE Init(INPUT_SWITCH_IDL_CLIENT_TYPE) = 0;
virtual HRESULT STDMETHODCALLTYPE SetCallback(IInputSwitchCallback*) = 0;
virtual HRESULT STDMETHODCALLTYPE ShowInputSwitch(const RECT*) = 0;
virtual HRESULT STDMETHODCALLTYPE GetProfileCount(UINT*, BOOL*) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCurrentProfile(INPUT_SWITCH_IDL_PROFILE_DATA*) = 0;
virtual HRESULT STDMETHODCALLTYPE RegisterHotkeys() = 0;
virtual HRESULT STDMETHODCALLTYPE ClickImeModeItem(INPUT_SWITCH_IDL_IME_CLICK_TYPE, POINT, const RECT*) = 0;
virtual HRESULT STDMETHODCALLTYPE ForceHide() = 0;
virtual HRESULT STDMETHODCALLTYPE ShowTouchKeyboardInputSwitch(const RECT*, INPUT_SWITCH_IDL_ALIGNMENT, int, DWORD, INPUT_SWITCH_IDL_MODALITY) = 0;
virtual HRESULT STDMETHODCALLTYPE GetContextFlags(DWORD*) = 0;
virtual HRESULT STDMETHODCALLTYPE SetContextOverrideMode(INPUT_SWITCH_IDL_CFOM) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCurrentImeModeItem(INPUT_SWITCH_IDL_IME_MODE_ITEM_DATA*) = 0;
virtual HRESULT STDMETHODCALLTYPE ActivateInputProfile(const WCHAR*) = 0;
virtual HRESULT STDMETHODCALLTYPE SetUserSid(const WCHAR*) = 0;
};
#else
typedef interface IInputSwitchControl IInputSwitchControl;
#endif
#ifdef __cplusplus
MIDL_INTERFACE("b9bc2a50-43c3-41aa-a082-5db14e184bae")
IInputSwitchControlSV2 : IUnknown
{
virtual HRESULT STDMETHODCALLTYPE Init(INPUT_SWITCH_IDL_CLIENT_TYPE) = 0;
virtual HRESULT STDMETHODCALLTYPE SetCallback(IInputSwitchCallback*) = 0;
virtual HRESULT STDMETHODCALLTYPE ShowInputSwitch(const RECT*) = 0;
virtual HRESULT STDMETHODCALLTYPE GetProfileCount(UINT*, BOOL*) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCurrentProfile(INPUT_SWITCH_IDL_PROFILE_DATA*) = 0;
virtual HRESULT STDMETHODCALLTYPE RegisterHotkeys() = 0;
virtual HRESULT STDMETHODCALLTYPE ClickImeModeItem(INPUT_SWITCH_IDL_IME_CLICK_TYPE, POINT, const RECT*) = 0;
virtual HRESULT STDMETHODCALLTYPE ClickImeModeItemWithAnchor(INPUT_SWITCH_IDL_IME_CLICK_TYPE, IUnknown*) = 0;
virtual HRESULT STDMETHODCALLTYPE ForceHide() = 0;
virtual HRESULT STDMETHODCALLTYPE ShowTouchKeyboardInputSwitch(const RECT*, INPUT_SWITCH_IDL_ALIGNMENT, int, DWORD, INPUT_SWITCH_IDL_MODALITY) = 0;
virtual HRESULT STDMETHODCALLTYPE GetContextFlags(DWORD*) = 0;
virtual HRESULT STDMETHODCALLTYPE SetContextOverrideMode(INPUT_SWITCH_IDL_CFOM) = 0;
virtual HRESULT STDMETHODCALLTYPE GetCurrentImeModeItem(INPUT_SWITCH_IDL_IME_MODE_ITEM_DATA*) = 0;
virtual HRESULT STDMETHODCALLTYPE ActivateInputProfile(const WCHAR*) = 0;
virtual HRESULT STDMETHODCALLTYPE SetUserSid(const WCHAR*) = 0;
};
#else
typedef interface IInputSwitchControlSV2 IInputSwitchControlSV2;
#endif
#ifdef __cplusplus
extern "C" {
#endif
HRESULT CInputSwitchControlProxy_CreateInstance(IInputSwitchControl* original, REFIID riid, void** ppvObject);
HRESULT CInputSwitchControlProxySV2_CreateInstance(IInputSwitchControlSV2* original, REFIID riid, void** ppvObject);
#ifdef __cplusplus
}
#endif

146
ExplorerPatcher/Localization.cpp

@ -0,0 +1,146 @@
#include "Localization.h"
#include <algorithm>
#include <vector>
#include "def.h"
extern "C"
{
EP_L10N_Language LangIDToEPLanguage(LANGID wLanguage)
{
EP_L10N_Language language = {};
language.id = wLanguage;
GetLocaleInfoW(wLanguage, LOCALE_SNAME, language.wszId, ARRAYSIZE(language.wszId));
GetLocaleInfoW(wLanguage, LOCALE_SLOCALIZEDDISPLAYNAME, language.wszDisplayName, ARRAYSIZE(language.wszDisplayName));
return language;
}
BOOL EP_L10N_ApplyPreferredLanguageForCurrentThread()
{
BOOL rv = FALSE;
HKEY hKey = nullptr;
RegCreateKeyExW(
HKEY_CURRENT_USER,
TEXT(REGPATH),
0,
nullptr,
REG_OPTION_NON_VOLATILE,
KEY_READ | KEY_WOW64_64KEY,
nullptr,
&hKey,
nullptr
);
if (hKey == nullptr || hKey == INVALID_HANDLE_VALUE)
{
hKey = nullptr;
}
if (hKey)
{
DWORD dwPreferredLanguage = 0;
DWORD dwSize = sizeof(dwPreferredLanguage);
LSTATUS lres = RegQueryValueExW(
hKey,
TEXT("Language"),
nullptr,
nullptr,
(LPBYTE)&dwPreferredLanguage,
&dwSize
);
if (lres == ERROR_SUCCESS && dwPreferredLanguage != 0)
{
EP_L10N_Language language = LangIDToEPLanguage((LANGID)dwPreferredLanguage);
rv = SetThreadPreferredUILanguages(MUI_LANGUAGE_NAME, language.wszId, nullptr);
}
else
{
rv = SetThreadPreferredUILanguages(MUI_LANGUAGE_NAME, nullptr, nullptr);
}
RegCloseKey(hKey);
}
return rv;
}
BOOL EP_L10N_GetCurrentUserLanguage(wchar_t* wszLanguage, int cch)
{
BOOL bOk = FALSE;
ULONG ulNumLanguages = 0;
ULONG cchLanguagesBuffer = 0;
if (GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &ulNumLanguages, nullptr, &cchLanguagesBuffer))
{
wchar_t* wszLanguagesBuffer = (wchar_t*)malloc(cchLanguagesBuffer * sizeof(wchar_t));
if (wszLanguagesBuffer)
{
if (GetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &ulNumLanguages, wszLanguagesBuffer, &cchLanguagesBuffer))
{
wcscpy_s(wszLanguage, cch, wszLanguagesBuffer);
bOk = TRUE;
}
free(wszLanguagesBuffer);
}
}
if (!bOk)
{
wcscpy_s(wszLanguage, cch, L"en-US");
}
return TRUE;
}
BOOL EP_L10N_GetCurrentThreadLanguage(wchar_t* wszLanguage, int cch)
{
BOOL bOk = FALSE;
ULONG ulNumLanguages = 0;
ULONG cchLanguagesBuffer = 0;
if (GetThreadPreferredUILanguages(MUI_LANGUAGE_NAME, &ulNumLanguages, nullptr, &cchLanguagesBuffer))
{
wchar_t* wszLanguagesBuffer = (wchar_t*)malloc(cchLanguagesBuffer * sizeof(wchar_t));
if (wszLanguagesBuffer)
{
if (GetThreadPreferredUILanguages(MUI_LANGUAGE_NAME, &ulNumLanguages, wszLanguagesBuffer, &cchLanguagesBuffer))
{
wcscpy_s(wszLanguage, cch, wszLanguagesBuffer);
bOk = TRUE;
}
free(wszLanguagesBuffer);
}
}
if (!bOk)
{
wcscpy_s(wszLanguage, cch, L"en-US");
}
return TRUE;
}
void EP_L10N_EnumerateLanguages(HMODULE hModule, LPCWSTR lpType, LPCWSTR lpName, EP_L10N_EnumerateLanguagesProc_t pfnProc, void* data)
{
std::vector<EP_L10N_Language> languages;
// English (US) is our primary language
languages.push_back(LangIDToEPLanguage(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)));
// Add the rest below it
EnumResourceLanguagesW(hModule, lpType, lpName, [](HMODULE, LPCWSTR, LPCWSTR, WORD wLanguage, LONG_PTR lParam) -> BOOL
{
if (wLanguage != MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US))
{
EP_L10N_Language language = LangIDToEPLanguage(wLanguage);
((std::vector<EP_L10N_Language>*)lParam)->push_back(language);
}
return TRUE;
}, (LONG_PTR)&languages);
// Sort the non-primary languages by localized display name
std::sort(languages.begin() + 1, languages.end(), [](const EP_L10N_Language& a, const EP_L10N_Language& b) -> bool
{
return wcscmp(a.wszDisplayName, b.wszDisplayName) < 0;
});
// Call the callback for each language
for (const EP_L10N_Language& language : languages)
{
pfnProc(&language, data);
}
}
}

26
ExplorerPatcher/Localization.h

@ -0,0 +1,26 @@
#pragma once
#include <Windows.h>
#ifdef __cplusplus
extern "C"
{
#endif
typedef struct EP_L10N_Language
{
LANGID id;
wchar_t wszId[LOCALE_NAME_MAX_LENGTH];
wchar_t wszDisplayName[LOCALE_NAME_MAX_LENGTH];
} EP_L10N_Language;
typedef void(*EP_L10N_EnumerateLanguagesProc_t)(const EP_L10N_Language* language, void* data);
BOOL EP_L10N_ApplyPreferredLanguageForCurrentThread();
BOOL EP_L10N_GetCurrentUserLanguage(wchar_t* wszLanguage, int cch);
BOOL EP_L10N_GetCurrentThreadLanguage(wchar_t* wszLanguage, int cch);
void EP_L10N_EnumerateLanguages(HMODULE hModule, LPCWSTR lpType, LPCWSTR lpName, EP_L10N_EnumerateLanguagesProc_t pfnProc, void* data);
#ifdef __cplusplus
}
#endif

BIN
ExplorerPatcher/RefreshedStyles.xbf

Binary file not shown.

154
ExplorerPatcher/StartMenu.c

@ -66,29 +66,6 @@ void OpenStartOnMonitor(HMONITOR monitor)
} }
} }
typedef struct _MonitorOverrideData
{
DWORD cbIndex;
DWORD dwIndex;
HMONITOR hMonitor;
} MonitorOverrideData;
BOOL ExtractMonitorByIndex(HMONITOR hMonitor, HDC hDC, LPRECT lpRect, MonitorOverrideData* mod)
{
POINT pt; pt.x = 0; pt.y = 0;
if (MonitorFromPoint(pt, MONITOR_DEFAULTTONULL) == hMonitor)
{
return TRUE;
}
if (mod->cbIndex == mod->dwIndex)
{
mod->hMonitor = hMonitor;
return FALSE;
}
mod->cbIndex++;
return TRUE;
}
LRESULT CALLBACK OpenStartOnCurentMonitorThreadHook( LRESULT CALLBACK OpenStartOnCurentMonitorThreadHook(
int code, int code,
WPARAM wParam, WPARAM wParam,
@ -500,6 +477,73 @@ static ULONG STDMETHODCALLTYPE WindowsUdk_UI_Shell_ITaskbarSettings_AddRefReleas
return 1; return 1;
} }
static HRESULT STDMETHODCALLTYPE WindowsUdk_UI_Shell_ITaskbarSettings6_GetEffectiveSearchMode(
void* instanceof_WindowsUdk_UI_Shell_ITaskbarSettings6,
DWORD* pEffectiveSearchMode
)
{
*pEffectiveSearchMode = 1;
return 0;
}
static void* instanceof_WindowsUdk_UI_Shell_ITaskbarSettings6Vtbl[41] = { // : IInspectableVtbl
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_AddRefRelease,
WindowsUdk_UI_Shell_ITaskbarSettings_AddRefRelease,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings6_GetEffectiveSearchMode,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented
};
typedef struct instanceof_WindowsUdk_UI_Shell_ITaskbarSettings6 // : IInspectable
{
void* lpVtbl;
} WindowsUdk_UI_Shell_ITaskbarSettings6;
static const WindowsUdk_UI_Shell_ITaskbarSettings6 instanceof_WindowsUdk_UI_Shell_ITaskbarSettings6 = { instanceof_WindowsUdk_UI_Shell_ITaskbarSettings6Vtbl };
static HRESULT STDMETHODCALLTYPE WindowsUdk_UI_Shell_ITaskbarSettings_QueryInterface(void* instanceof_WindowsUdk_UI_Shell_ITaskbarSettings, REFIID riid, void** ppv)
{
if (IsEqualIID(riid, &IID_WindowsUdk_UI_Shell_ITaskbarSettings6)) {
*ppv = &instanceof_WindowsUdk_UI_Shell_ITaskbarSettings6;
return S_OK;
}
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE WindowsUdk_UI_Shell_ITaskbarSettings_GetAlignment_Left( static HRESULT STDMETHODCALLTYPE WindowsUdk_UI_Shell_ITaskbarSettings_GetAlignment_Left(
void* instanceof_WindowsUdk_UI_Shell_ITaskbarSettings, void* instanceof_WindowsUdk_UI_Shell_ITaskbarSettings,
DWORD* pAlignment DWORD* pAlignment
@ -546,7 +590,7 @@ static HRESULT STDMETHODCALLTYPE WindowsUdk_UI_Shell_ITaskbarSettings_GetSearchM
} }
static void* instanceof_WindowsUdk_UI_Shell_ITaskbarSettingsVtbl[41] = { // : IInspectableVtbl static void* instanceof_WindowsUdk_UI_Shell_ITaskbarSettingsVtbl[41] = { // : IInspectableVtbl
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented, WindowsUdk_UI_Shell_ITaskbarSettings_QueryInterface,
WindowsUdk_UI_Shell_ITaskbarSettings_AddRefRelease, WindowsUdk_UI_Shell_ITaskbarSettings_AddRefRelease,
WindowsUdk_UI_Shell_ITaskbarSettings_AddRefRelease, WindowsUdk_UI_Shell_ITaskbarSettings_AddRefRelease,
WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented, WindowsUdk_UI_Shell_ITaskbarSettings_NotImplemented,
@ -594,6 +638,18 @@ typedef struct instanceof_WindowsUdk_UI_Shell_ITaskbarSettings // : IInspectable
} WindowsUdk_UI_Shell_ITaskbarSettings; } WindowsUdk_UI_Shell_ITaskbarSettings;
static const WindowsUdk_UI_Shell_ITaskbarSettings instanceof_WindowsUdk_UI_Shell_ITaskbarSettings = { instanceof_WindowsUdk_UI_Shell_ITaskbarSettingsVtbl }; static const WindowsUdk_UI_Shell_ITaskbarSettings instanceof_WindowsUdk_UI_Shell_ITaskbarSettings = { instanceof_WindowsUdk_UI_Shell_ITaskbarSettingsVtbl };
static unsigned __int64 FindTokenByHMONITOR(const StartMenuPositioningData* data, HMONITOR hMonitor)
{
for (DWORD i = 0; i < *data->pMonitorCount; i++)
{
if (data->pMonitorList[i].hMonitor == hMonitor)
{
return data->pMonitorList[i].token;
}
}
return 0;
}
BOOL NeedsRo_PositionStartMenuForMonitor( BOOL NeedsRo_PositionStartMenuForMonitor(
HMONITOR hMonitor, HMONITOR hMonitor,
HDC unused1, HDC unused1,
@ -633,6 +689,7 @@ BOOL NeedsRo_PositionStartMenuForMonitor(
//hr = (*(HRESULT(**)(INT64, INT64*))(*(INT64*)pTaskbarLayoutFactory + 48))(pTaskbarLayoutFactory, &v12); //hr = (*(HRESULT(**)(INT64, INT64*))(*(INT64*)pTaskbarLayoutFactory + 48))(pTaskbarLayoutFactory, &v12);
hr = pTaskbarLayoutFactory->lpVtbl->get_Current(pTaskbarLayoutFactory, &pTaskbarLayout); hr = pTaskbarLayoutFactory->lpVtbl->get_Current(pTaskbarLayoutFactory, &pTaskbarLayout);
} }
int interfaceVersion = 1;
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
/*hr = (**(HRESULT(***)(INT64, GUID*, INT64*))v12)( /*hr = (**(HRESULT(***)(INT64, GUID*, INT64*))v12)(
@ -645,6 +702,15 @@ BOOL NeedsRo_PositionStartMenuForMonitor(
&IID_WindowsUdk_UI_Shell_ITaskbarLayoutManager, &IID_WindowsUdk_UI_Shell_ITaskbarLayoutManager,
&pTaskbarLayoutManager &pTaskbarLayoutManager
); );
if (hr == E_NOINTERFACE)
{
interfaceVersion = 2;
hr = pTaskbarLayout->lpVtbl->QueryInterface(
pTaskbarLayout,
&IID_WindowsUdk_UI_Shell_ITaskbarLayoutManager2,
&pTaskbarLayoutManager
);
}
} }
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
@ -669,31 +735,59 @@ BOOL NeedsRo_PositionStartMenuForMonitor(
instanceof_WindowsUdk_UI_Shell_ITaskbarSettingsVtbl[14] = WindowsUdk_UI_Shell_ITaskbarSettings_GetSearchMode; instanceof_WindowsUdk_UI_Shell_ITaskbarSettingsVtbl[14] = WindowsUdk_UI_Shell_ITaskbarSettings_GetSearchMode;
if (data->operation == STARTMENU_POSITIONING_OPERATION_ADD) if (data->operation == STARTMENU_POSITIONING_OPERATION_ADD)
{
unsigned __int64 token = 0;
if (interfaceVersion == 1)
{ {
hr = pTaskbarLayoutManager->lpVtbl->ReportMonitorAdded( hr = pTaskbarLayoutManager->lpVtbl->ReportMonitorAdded(
pTaskbarLayoutManager, pTaskbarLayoutManager,
hMonitor, (unsigned __int64)hMonitor,
&instanceof_WindowsUdk_UI_Shell_ITaskbarSettings, &instanceof_WindowsUdk_UI_Shell_ITaskbarSettings,
NULL NULL
); );
data->pMonitorList[InterlockedIncrement(data->pMonitorCount) - 1] = hMonitor; }
else
{
hr = pTaskbarLayoutManager->lpVtbl->ReportMonitorAdded2(
pTaskbarLayoutManager,
(unsigned __int64)hMonitor,
&instanceof_WindowsUdk_UI_Shell_ITaskbarSettings,
NULL,
&token
);
}
MonitorListEntry entry = {
.hMonitor = hMonitor,
.token = token
};
data->pMonitorList[InterlockedIncrement(data->pMonitorCount) - 1] = entry;
printf("[Positioning] Added settings for monitor %p : %d\n", hMonitor, data->location); printf("[Positioning] Added settings for monitor %p : %d\n", hMonitor, data->location);
} }
else if (data->operation == STARTMENU_POSITIONING_OPERATION_CHANGE) else if (data->operation == STARTMENU_POSITIONING_OPERATION_CHANGE)
{
hr = E_FAIL;
unsigned __int64 arg = interfaceVersion == 1 ? (unsigned __int64)hMonitor : FindTokenByHMONITOR(data, hMonitor);
if (arg)
{ {
hr = pTaskbarLayoutManager->lpVtbl->ReportSettingsForMonitor( hr = pTaskbarLayoutManager->lpVtbl->ReportSettingsForMonitor(
pTaskbarLayoutManager, pTaskbarLayoutManager,
hMonitor, arg,
&instanceof_WindowsUdk_UI_Shell_ITaskbarSettings &instanceof_WindowsUdk_UI_Shell_ITaskbarSettings
); );
}
printf("[Positioning] Changed settings for monitor: %p : %d\n", hMonitor, data->location); printf("[Positioning] Changed settings for monitor: %p : %d\n", hMonitor, data->location);
} }
else if (data->operation == STARTMENU_POSITIONING_OPERATION_REMOVE) else if (data->operation == STARTMENU_POSITIONING_OPERATION_REMOVE)
{
hr = E_FAIL;
unsigned __int64 arg = interfaceVersion == 1 ? (unsigned __int64)hMonitor : data->pMonitorList[data->i].token;
if (arg)
{ {
hr = pTaskbarLayoutManager->lpVtbl->ReportMonitorRemoved( hr = pTaskbarLayoutManager->lpVtbl->ReportMonitorRemoved(
pTaskbarLayoutManager, pTaskbarLayoutManager,
hMonitor arg
); );
}
printf("[Positioning] Removed settings for monitor: %p\n", hMonitor); printf("[Positioning] Removed settings for monitor: %p\n", hMonitor);
} }
} }
@ -721,7 +815,7 @@ BOOL NeedsRo_PositionStartMenuForMonitor(
return TRUE; return TRUE;
} }
DWORD GetStartMenuPosition(FARPROC SHRegGetValueFromHKCUHKLMFunc) DWORD GetStartMenuPosition(t_SHRegGetValueFromHKCUHKLM SHRegGetValueFromHKCUHKLMFunc)
{ {
DWORD dwSize = sizeof(DWORD); DWORD dwSize = sizeof(DWORD);
@ -732,7 +826,7 @@ DWORD GetStartMenuPosition(FARPROC SHRegGetValueFromHKCUHKLMFunc)
SRRF_RT_REG_DWORD, SRRF_RT_REG_DWORD,
NULL, NULL,
&dwTaskbarAl, &dwTaskbarAl,
(LPDWORD)(&dwSize) &dwSize
) != ERROR_SUCCESS) ) != ERROR_SUCCESS)
{ {
dwTaskbarAl = 1; dwTaskbarAl = 1;

84
ExplorerPatcher/StartMenu.h

@ -42,6 +42,12 @@ DEFINE_GUID(IID_IImmersiveLauncher10RS,
0x32, 0x1f, 0xd1, 0xb4, 0x98, 0x64 0x32, 0x1f, 0xd1, 0xb4, 0x98, 0x64
); );
DEFINE_GUID(IID_WindowsUdk_UI_Shell_ITaskbarSettings6,
0x5CBF9899,
0x3E66, 0x5556, 0xA1, 0x31,
0x1E, 0x3E, 0xE8, 0x14, 0x85, 0x90
);
typedef interface IImmersiveMonitorService IImmersiveMonitorService; typedef interface IImmersiveMonitorService IImmersiveMonitorService;
typedef struct IImmersiveMonitorServiceVtbl typedef struct IImmersiveMonitorServiceVtbl
@ -173,42 +179,6 @@ interface IImmersiveLauncher10RS
CONST_VTBL struct IImmersiveLauncher10RSVtbl* lpVtbl; CONST_VTBL struct IImmersiveLauncher10RSVtbl* lpVtbl;
}; };
DEFINE_GUID(IID_ILauncherTipContextMenu,
0xb8c1db5f,
0xcbb3, 0x48bc, 0xaf, 0xd9,
0xce, 0x6b, 0x88, 0x0c, 0x79, 0xed
);
typedef interface ILauncherTipContextMenu ILauncherTipContextMenu;
typedef struct ILauncherTipContextMenuVtbl
{
BEGIN_INTERFACE
HRESULT(STDMETHODCALLTYPE* QueryInterface)(
ILauncherTipContextMenu* This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void** ppvObject);
ULONG(STDMETHODCALLTYPE* AddRef)(
ILauncherTipContextMenu* This);
ULONG(STDMETHODCALLTYPE* Release)(
ILauncherTipContextMenu* This);
HRESULT(STDMETHODCALLTYPE* ShowLauncherTipContextMenu)(
ILauncherTipContextMenu* This,
/* [in] */ POINT* pt);
END_INTERFACE
} ILauncherTipContextMenuVtbl;
interface ILauncherTipContextMenu
{
CONST_VTBL struct ILauncherTipContextMenuVtbl* lpVtbl;
};
void OpenStartOnMonitor(HMONITOR monitor); void OpenStartOnMonitor(HMONITOR monitor);
// Slightly tweaked version of function available in Open Shell // Slightly tweaked version of function available in Open Shell
@ -285,9 +255,16 @@ interface WindowsUdk_UI_Shell_TaskbarLayoutStatics // : IInspectable
}; };
DEFINE_GUID(IID_WindowsUdk_UI_Shell_ITaskbarLayoutManager, DEFINE_GUID(IID_WindowsUdk_UI_Shell_ITaskbarLayoutManager,
0x4FB10D7C4, 0xFB10D7C4,
0x4F7F, 0x5DE5, 0xA5, 0x28, 0x4F7F, 0x5DE5, 0xA5, 0x28,
0x7e, 0xfe, 0xf4, 0x18, 0xaa, 0x48 0x7E, 0xFE, 0xF4, 0x18, 0xAA, 0x48
);
// Used in 23545+ (or maybe couple lower builds too). Still named ITaskbarLayoutManager but has different ReportMonitorAdded signature.
DEFINE_GUID(IID_WindowsUdk_UI_Shell_ITaskbarLayoutManager2,
0x98F82ED2,
0x4791, 0x58A0, 0x8D, 0x2F,
0xDA, 0xBD, 0x7A, 0x2F, 0x18, 0x9F
); );
typedef struct WindowsUdk_UI_Shell_TaskbarLayoutManagerVtbl // : IInspectableVtbl typedef struct WindowsUdk_UI_Shell_TaskbarLayoutManagerVtbl // : IInspectableVtbl
@ -319,29 +296,39 @@ typedef struct WindowsUdk_UI_Shell_TaskbarLayoutManagerVtbl // : IInspectableVtb
__RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This, __RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This,
/* [out] */ __RPC__out TrustLevel* trustLevel); /* [out] */ __RPC__out TrustLevel* trustLevel);
union
{
HRESULT(STDMETHODCALLTYPE* ReportMonitorAdded)( HRESULT(STDMETHODCALLTYPE* ReportMonitorAdded)(
__RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This, __RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This,
__RPC__in HMONITOR hMonitor, __RPC__in unsigned __int64 hMonitor,
__RPC__in void* _instance_of_winrt_WindowsUdk_UI_Shell_ITaskbarSettings, __RPC__in void* _instance_of_winrt_WindowsUdk_UI_Shell_ITaskbarSettings,
__RPC__in LPRECT _unknown_lpGeometry); __RPC__in void* _unknown_shellViewToRectMap);
HRESULT(STDMETHODCALLTYPE* ReportMonitorAdded2)(
__RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This,
__RPC__in unsigned __int64 hMonitor,
__RPC__in void* _instance_of_winrt_WindowsUdk_UI_Shell_ITaskbarSettings,
__RPC__in void* _unknown_shellViewToRectMap,
/* [out] */ __RPC__out unsigned __int64* result);
};
HRESULT(STDMETHODCALLTYPE* ReportMonitorRemoved)( HRESULT(STDMETHODCALLTYPE* ReportMonitorRemoved)(
__RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This, __RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This,
__RPC__in HMONITOR hMonitor); __RPC__in unsigned __int64 hMonitor);
HRESULT(STDMETHODCALLTYPE* ReportMonitorChanged)( HRESULT(STDMETHODCALLTYPE* ReportMonitorChanged)(
__RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This, __RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This,
__RPC__in HMONITOR hMonitor, __RPC__in unsigned __int64 hMonitor,
__RPC__in LPRECT _unknown_lpGeometry); __RPC__in LPRECT _unknown_lpGeometry);
HRESULT(STDMETHODCALLTYPE* ReportSettingsForMonitor)( HRESULT(STDMETHODCALLTYPE* ReportSettingsForMonitor)(
__RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This, __RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This,
__RPC__in HMONITOR hMonitor, __RPC__in unsigned __int64 hMonitor,
__RPC__in void* _instance_of_winrt_WindowsUdk_UI_Shell_ITaskbarSettings); __RPC__in void* _instance_of_winrt_WindowsUdk_UI_Shell_ITaskbarSettings);
HRESULT(STDMETHODCALLTYPE* ReportShellViewButtonBounds)( HRESULT(STDMETHODCALLTYPE* ReportShellViewButtonBounds)(
__RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This, __RPC__in WindowsUdk_UI_Shell_TaskbarLayoutManager* This,
__RPC__in HMONITOR hMonitor, __RPC__in unsigned __int64 hMonitor,
__RPC__in void* _instanceof_winrt_WindowsUdk_UI_Shell_Bamo_ShellViewButtonBounds); __RPC__in void* _instanceof_winrt_WindowsUdk_UI_Shell_Bamo_ShellViewButtonBounds);
END_INTERFACE END_INTERFACE
@ -352,12 +339,19 @@ interface WindowsUdk_UI_Shell_TaskbarLayoutManager // : IInspectable
CONST_VTBL struct WindowsUdk_UI_Shell_TaskbarLayoutManagerVtbl* lpVtbl; CONST_VTBL struct WindowsUdk_UI_Shell_TaskbarLayoutManagerVtbl* lpVtbl;
}; };
typedef struct _MonitorListEntry
{
HMONITOR hMonitor;
unsigned __int64 token;
} MonitorListEntry;
typedef struct _StartMenuPositioningData typedef struct _StartMenuPositioningData
{ {
DWORD location; DWORD location;
DWORD operation; DWORD operation;
DWORD* pMonitorCount; DWORD* pMonitorCount;
HMONITOR* pMonitorList; MonitorListEntry* pMonitorList;
DWORD i;
} StartMenuPositioningData; } StartMenuPositioningData;
#define STARTMENU_POSITIONING_OPERATION_ADD 0 #define STARTMENU_POSITIONING_OPERATION_ADD 0

1337
ExplorerPatcher/StartMenuSettings.cpp

File diff suppressed because it is too large Load Diff

29
ExplorerPatcher/StartupSound.c

@ -1,29 +0,0 @@
#include "StartupSound.h"
DWORD PlayStartupSound(PlayStartupSoundParams* unused)
{
Sleep(2000);
printf("Started \"Play startup sound\" thread.\n");
HRESULT hr = CoInitialize(NULL);
// this checks Software\\Microsoft\\Windows\\CurrentVersion\\Authentication\\LogonUI\\LogonSoundPlayed
// and then plays the startup sound
AuthUILogonSound* ppv;
hr = CoCreateInstance(
&__uuidof_AuthUILogonSound,
NULL,
CLSCTX_INPROC_SERVER,
&__uuidof_IAuthUILogonSound,
&ppv
);
if (SUCCEEDED(hr))
{
ppv->lpVtbl->PlayIfNecessary(ppv, 1);
ppv->lpVtbl->Release(ppv);
}
printf("Ended \"Play startup sound\" thread.\n");
return 0;
}

390
ExplorerPatcher/StartupSound.cpp

@ -0,0 +1,390 @@
#include "StartupSound.h"
#include <Shlwapi.h>
#pragma comment(lib, "Shlwapi.lib")
#include <stdio.h>
#include <strsafe.h>
#pragma comment(lib, "Winmm.lib")
#include <Wtsapi32.h>
#pragma comment(lib, "Wtsapi32.lib")
#include <tchar.h>
#include <wrl/client.h>
#include <wil/result_macros.h>
#include "def.h"
BOOL AreLogonLogoffShutdownSoundsEnabled()
{
#if 0
DWORD dwValue = 0;
DWORD dwSize = sizeof(dwValue);
RegGetValueW(HKEY_CURRENT_USER, _T(REGPATH), L"LogonLogoffShutdownSounds", RRF_RT_DWORD, nullptr, &dwValue, &dwSize);
return dwValue != 0;
#else
return FALSE;
#endif
}
DWORD GetLastErrorError()
{
DWORD result = GetLastError();
return result == ERROR_SUCCESS ? 1 : result;
}
HRESULT HRESULTFromLastErrorError()
{
DWORD error = GetLastError();
if (error != ERROR_SUCCESS && (int)error <= 0)
return (HRESULT)GetLastErrorError();
else
return (HRESULT)((GetLastErrorError() & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000);
}
DWORD PlaySoundFileThreadProc(LPVOID pvData)
{
PlaySoundW((LPCWSTR)pvData, nullptr, SND_NODEFAULT | SND_MEMORY | SND_SYSTEM);
LocalFree(pvData);
return 0;
}
HRESULT PlaySoundFile(HANDLE* phThread, const WCHAR* pszPath)
{
HRESULT hr;
void* pvData = nullptr;
HANDLE hFile = CreateFileW(
pszPath,
GENERIC_READ,
FILE_SHARE_READ | FILE_SHARE_DELETE,
nullptr,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN,
nullptr
);
if (hFile != INVALID_HANDLE_VALUE)
{
DWORD dwSize = GetFileSize(hFile, nullptr);
hr = E_OUTOFMEMORY;
if (dwSize != (DWORD)-1 && dwSize)
{
if (dwSize < 0x400000)
{
pvData = LocalAlloc(0, dwSize);
if (pvData)
{
DWORD dwRead;
if (ReadFile(hFile, pvData, dwSize, &dwRead, nullptr))
hr = dwSize == dwRead ? S_OK : HRESULT_FROM_WIN32(ERROR_IO_PENDING);
else
hr = HRESULTFromLastErrorError();
}
}
}
else
{
hr = HRESULTFromLastErrorError();
}
CloseHandle(hFile);
}
else
{
hr = HRESULTFromLastErrorError();
}
if (SUCCEEDED(hr))
{
HANDLE hThread = CreateThread(nullptr, 0, PlaySoundFileThreadProc, pvData, 0, nullptr);
if (hThread)
{
if (phThread)
*phThread = hThread;
else
CloseHandle(hThread);
return hr;
}
hr = HRESULTFromLastErrorError();
}
if (pvData)
LocalFree(pvData);
return hr;
}
typedef enum LOGONOFFSOUNDTYPE
{
LOGONOFFSOUNDTYPE_LOGON,
LOGONOFFSOUNDTYPE_LOGOFF,
LOGONOFFSOUNDTYPE_EXIT,
} LOGONOFFSOUNDTYPE;
HRESULT PlayLogonLogoffSound(HANDLE* phThread, LOGONOFFSOUNDTYPE type)
{
const WCHAR* szEventName;
switch (type)
{
case LOGONOFFSOUNDTYPE_LOGON:
szEventName = L"WindowsLogon";
break;
case LOGONOFFSOUNDTYPE_LOGOFF:
szEventName = L"WindowsLogoff";
break;
default:
szEventName = L"SystemExit";
break;
}
WCHAR szSubKey[MAX_PATH];
HRESULT hr = StringCchPrintfW(szSubKey, ARRAYSIZE(szSubKey), L"AppEvents\\Schemes\\Apps\\.Default\\%ws\\.Current", szEventName);
if (FAILED(hr))
return hr;
WCHAR szPath[MAX_PATH];
DWORD cbData = sizeof(szPath);
LSTATUS lStat = RegGetValueW(HKEY_CURRENT_USER, szSubKey, nullptr, REG_EXPAND_SZ, nullptr, szPath, &cbData);
if (lStat != ERROR_SUCCESS)
return HRESULT_FROM_WIN32(lStat);
return PlaySoundFile(phThread, szPath);
}
// https://stackoverflow.com/a/59810748
bool IsSessionLocked()
{
WTSINFOEXW* pInfo = NULL;
WTS_INFO_CLASS wtsic = WTSSessionInfoEx;
LPTSTR ppBuffer = NULL;
DWORD dwBytesReturned = 0;
LONG sessionFlags = WTS_SESSIONSTATE_UNKNOWN;
DWORD dwSessionID = WTSGetActiveConsoleSessionId();
if (WTSQuerySessionInformationW(WTS_CURRENT_SERVER_HANDLE, dwSessionID, wtsic, &ppBuffer, &dwBytesReturned))
{
if (dwBytesReturned > 0)
{
pInfo = (WTSINFOEXW*)ppBuffer;
if (pInfo->Level == 1)
{
sessionFlags = pInfo->Data.WTSInfoExLevel1.SessionFlags;
}
}
WTSFreeMemory(ppBuffer);
ppBuffer = NULL;
}
return (sessionFlags == WTS_SESSIONSTATE_LOCK);
}
HRESULT (*CLogonSound_PlayIfNecessaryFunc)(void* _this, LOGON_SOUND_CLIENT client);
HRESULT CLogonSound_PlayIfNecessaryHook(void* _this, LOGON_SOUND_CLIENT client)
{
HRESULT hr = CLogonSound_PlayIfNecessaryFunc(_this, client);
if (hr != S_OK && client == LSC_EXPLORER)
{
if (!IsSessionLocked())
PlayLogonLogoffSound(nullptr, LOGONOFFSOUNDTYPE_LOGON);
}
return hr;
}
HRESULT HookLogonSound()
{
RETURN_IF_FAILED(CoInitialize(nullptr));
Microsoft::WRL::ComPtr<IAuthUILogonSound> logonSound;
RETURN_IF_FAILED(CoCreateInstance(__uuidof_AuthUILogonSound, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&logonSound)));
void** vtable = *(void***)logonSound.Get();
DWORD flOldProtect;
RETURN_HR_IF(E_FAIL, !VirtualProtect(&vtable[3], sizeof(void*), PAGE_EXECUTE_READWRITE, &flOldProtect));
CLogonSound_PlayIfNecessaryFunc = (decltype(CLogonSound_PlayIfNecessaryFunc))vtable[3];
vtable[3] = (void*)CLogonSound_PlayIfNecessaryHook;
VirtualProtect(&vtable[3], sizeof(void*), flOldProtect, &flOldProtect);
return S_OK;
}
LRESULT SHDefWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
if (IsWindowUnicode(hwnd))
{
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
}
else
{
return DefWindowProcA(hwnd, uMsg, wParam, lParam);
}
}
HWND g_hwndSound;
class CSoundWnd
{
public:
CSoundWnd();
BOOL Init();
DWORD Release();
protected:
static LRESULT CALLBACK s_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT v_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
private:
static DWORD s_CreateWindow(void* pvParam);
static DWORD s_ThreadProc(void* pvParam);
LONG m_refCount;
HWND m_hwnd;
HANDLE m_thread;
};
CSoundWnd::CSoundWnd()
: m_refCount(1)
, m_hwnd(nullptr)
, m_thread(nullptr)
{
}
BOOL CSoundWnd::Init()
{
SHCreateThread(s_ThreadProc, this, CTF_THREAD_REF | CTF_COINIT_STA | CTF_REF_COUNTED | CTF_NOADDREFLIB, s_CreateWindow);
g_hwndSound = m_hwnd;
return m_hwnd != nullptr;
}
DWORD CSoundWnd::Release()
{
LONG refCount = InterlockedDecrement(&m_refCount);
if (refCount == 0 && this)
operator delete(this);
return refCount;
}
LRESULT CSoundWnd::s_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
CSoundWnd* pThis = (CSoundWnd*)GetWindowLongPtrW(hwnd, 0);
if (pThis)
return pThis->v_WndProc(hwnd, uMsg, wParam, lParam);
else
return SHDefWindowProc(hwnd, uMsg, wParam, lParam);
}
LRESULT CSoundWnd::v_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_QUERYENDSESSION:
{
if ((lParam & ENDSESSION_CRITICAL) == 0)
{
WCHAR sz[256];
LoadStringW(GetModuleHandleW(nullptr), 731, sz, ARRAYSIZE(sz)); // Playing logoff sound...
ShutdownBlockReasonCreate(m_hwnd, sz);
PlayLogonLogoffSound(&m_thread, (lParam & ENDSESSION_LOGOFF) != 0 ? LOGONOFFSOUNDTYPE_LOGOFF : LOGONOFFSOUNDTYPE_EXIT);
if (m_thread)
{
WaitForSingleObject(m_thread, INFINITE); // @MOD
CloseHandle(m_thread); // @MOD
}
}
return 1;
}
case WM_ENDSESSION:
{
/*if (wParam && (lParam & ENDSESSION_CRITICAL) == 0 && m_thread) // @MOD This doesn't work
{
WaitForSingleObject(m_thread, INFINITE);
CloseHandle(m_thread);
}*/
DestroyWindow(m_hwnd);
break;
}
case WM_NCDESTROY:
{
SetWindowLongW(hwnd, 0, 0);
g_hwndSound = nullptr;
m_hwnd = nullptr;
PostQuitMessage(0);
return 0;
}
}
return SHDefWindowProc(hwnd, uMsg, wParam, lParam);
}
extern "C" HWND (__stdcall *explorerframe_SHCreateWorkerWindowFunc)(
WNDPROC wndProc,
HWND hWndParent,
DWORD dwExStyle,
DWORD dwStyle,
HMENU hMenu,
LONG_PTR wnd_extra
);
DWORD CSoundWnd::s_CreateWindow(void* pvParam)
{
CSoundWnd* pThis = (CSoundWnd*)pvParam;
InterlockedIncrement(&pThis->m_refCount);
pThis->m_hwnd = explorerframe_SHCreateWorkerWindowFunc(s_WndProc, nullptr, 0, 0, nullptr, (LONG_PTR)pThis);
return 0;
}
DWORD CSoundWnd::s_ThreadProc(void* pvParam)
{
CSoundWnd* pThis = (CSoundWnd*)pvParam;
if (pThis->m_hwnd)
{
MSG Msg;
while (GetMessageW(&Msg, nullptr, 0, 0))
{
TranslateMessage(&Msg);
DispatchMessageW(&Msg);
}
}
pThis->Release();
return 0;
}
BOOL InitSoundWindow()
{
BOOL bSuccess = FALSE;
CSoundWnd* soundWnd = new CSoundWnd();
if (soundWnd)
{
bSuccess = soundWnd->Init();
soundWnd->Release();
}
return bSuccess;
}
void TermSoundWindow()
{
if (g_hwndSound)
{
PostMessageW(g_hwndSound, WM_CLOSE, 0, 0);
g_hwndSound = nullptr;
}
}
HRESULT SHPlaySound(LPCWSTR pszSound, DWORD dwFlags)
{
HRESULT hr;
BOOL bDefault = (dwFlags & 1) != 0;
BOOL bSecondAttempt = FALSE;
while (true)
{
WCHAR szKey[MAX_PATH];
hr = StringCchPrintfW(szKey, MAX_PATH, L"AppEvents\\Schemes\\Apps\\%s\\%s\\.current", bDefault ? L".Default" : L"Explorer", pszSound);
if (SUCCEEDED(hr))
{
WCHAR pvData[MAX_PATH];
DWORD cbData = sizeof(pvData);
if (SHGetValueW(HKEY_CURRENT_USER, szKey, nullptr, nullptr, pvData, &cbData) == ERROR_SUCCESS && cbData && pvData[0])
hr = PlaySoundW(pszSound, nullptr, (!bDefault ? 0x400000 : 0) | (SND_ASYNC | SND_NODEFAULT | SND_NOSTOP | SND_NOWAIT | SND_ALIAS | SND_SENTRY | SND_SYSTEM)) ? S_OK : S_FALSE;
}
if (hr == S_OK || (dwFlags & 2) == 0 || bSecondAttempt)
break;
bDefault = !bDefault;
bSecondAttempt = TRUE;
}
return hr;
}

54
ExplorerPatcher/StartupSound.h

@ -8,43 +8,33 @@ DEFINE_GUID(__uuidof_AuthUILogonSound,
0x1100, 0x4389, 0xAB, 0x44, 0x1100, 0x4389, 0xAB, 0x44,
0x46, 0x4F, 0xAF, 0x00, 0x12, 0x88 0x46, 0x4F, 0xAF, 0x00, 0x12, 0x88
); );
DEFINE_GUID(__uuidof_IAuthUILogonSound,
0xc35243ea,
0x4cfc, 0x435a, 0x91, 0xc2,
0x9d, 0xbd, 0xec, 0xbf, 0xfc, 0x95
);
typedef interface AuthUILogonSound AuthUILogonSound;
typedef struct AuthUILogonSoundVtbl #ifdef __cplusplus
enum LOGON_SOUND_CLIENT
{ {
BEGIN_INTERFACE LSC_LOGONUI,
LSC_EXPLORER,
HRESULT(STDMETHODCALLTYPE* QueryInterface)( };
AuthUILogonSound* This,
/* [in] */ REFIID riid,
/* [annotation][iid_is][out] */
_COM_Outptr_ void** ppvObject);
ULONG(STDMETHODCALLTYPE* AddRef)(
AuthUILogonSound* This);
ULONG(STDMETHODCALLTYPE* Release)(
AuthUILogonSound* This);
HRESULT(STDMETHODCALLTYPE* PlayIfNecessary)(
AuthUILogonSound* This,
/* [in] */ INT64 a1);
END_INTERFACE
} AuthUILogonSoundVtbl;
interface AuthUILogonSound MIDL_INTERFACE("c35243ea-4cfc-435a-91c2-9dbdecbffc95")
IAuthUILogonSound : IUnknown
{ {
CONST_VTBL struct AuthUILogonSoundVtbl* lpVtbl; virtual HRESULT STDMETHODCALLTYPE PlayIfNecessary(LOGON_SOUND_CLIENT client) = 0;
}; };
#endif
#ifdef __cplusplus
extern "C" {
#endif
BOOL AreLogonLogoffShutdownSoundsEnabled();
HRESULT HookLogonSound();
BOOL InitSoundWindow();
void TermSoundWindow();
__declspec(dllexport) HRESULT SHPlaySound(LPCWSTR pszSound, DWORD dwFlags);
typedef DWORD PlayStartupSoundParams; #ifdef __cplusplus
}
#endif
DWORD PlayStartupSound(PlayStartupSoundParams* unused);
#endif #endif

279
ExplorerPatcher/Taskbar10.cpp

@ -0,0 +1,279 @@
#include "utility.h"
#include "ImmersiveColor.h"
#include <dcomptypes.h>
#include <wrl/implements.h>
#include <wrl/wrappers/corewrappers.h>
#include <wil/result_macros.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!)
***/
MIDL_INTERFACE("27775f88-01d3-46ec-a1c1-64b4c09b211b")
ITrayUIComponent : IUnknown
{
virtual HRESULT STDMETHODCALLTYPE InitializeWithTray(ITrayUIHost* host, ITrayUI** result) = 0;
};
class EPTrayUIComponent : public Microsoft::WRL::RuntimeClass<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, ITrayUIComponent>
{
public:
STDMETHODIMP InitializeWithTray(ITrayUIHost* host, ITrayUI** result) override
{
RETURN_IF_FAILED(explorer_TrayUI_CreateInstanceFunc(host, IID_ITrayUI, (void**)result));
// Fix delayed logon when using the Windows 10 taskbar on Windows 11 21H2.
// Not present in 51, present in 120 onwards. 65, 71, and 100 are not checked yet.
if (global_rovi.dwBuildNumber == 22000 && global_ubr >= 120)
{
void** vtable = *(void***)host;
void (*FireDesktopSwitchIfReady)(ITrayUIHost*, int) = (decltype(FireDesktopSwitchIfReady))vtable[78];
FireDesktopSwitchIfReady(host, 8);
}
return S_OK;
}
};
extern "C" HRESULT EPTrayUIComponent_CreateInstance(REFIID riid, void** ppvObject)
{
Microsoft::WRL::ComPtr<EPTrayUIComponent> instance;
RETURN_IF_FAILED(Microsoft::WRL::MakeAndInitialize<EPTrayUIComponent>(&instance));
RETURN_HR(instance.CopyTo(riid, ppvObject));
}
#pragma endregion
#pragma region "Restore acrylic background"
typedef enum WINDOWCOMPOSITIONATTRIB
{
WCA_UNDEFINED = 0,
WCA_NCRENDERING_ENABLED = 1,
WCA_NCRENDERING_POLICY = 2,
WCA_TRANSITIONS_FORCEDISABLED = 3,
WCA_ALLOW_NCPAINT = 4,
WCA_CAPTION_BUTTON_BOUNDS = 5,
WCA_NONCLIENT_RTL_LAYOUT = 6,
WCA_FORCE_ICONIC_REPRESENTATION = 7,
WCA_EXTENDED_FRAME_BOUNDS = 8,
WCA_HAS_ICONIC_BITMAP = 9,
WCA_THEME_ATTRIBUTES = 10,
WCA_NCRENDERING_EXILED = 11,
WCA_NCADORNMENTINFO = 12,
WCA_EXCLUDED_FROM_LIVEPREVIEW = 13,
WCA_VIDEO_OVERLAY_ACTIVE = 14,
WCA_FORCE_ACTIVEWINDOW_APPEARANCE = 15,
WCA_DISALLOW_PEEK = 16,
WCA_CLOAK = 17,
WCA_CLOAKED = 18,
WCA_ACCENT_POLICY = 19,
WCA_FREEZE_REPRESENTATION = 20,
WCA_EVER_UNCLOAKED = 21,
WCA_VISUAL_OWNER = 22,
WCA_HOLOGRAPHIC = 23,
WCA_EXCLUDED_FROM_DDA = 24,
WCA_PASSIVEUPDATEMODE = 25,
WCA_USEDARKMODECOLORS = 26,
WCA_CORNER_STYLE = 27,
WCA_PART_COLOR = 28,
WCA_DISABLE_MOVESIZE_FEEDBACK = 29,
WCA_SYSTEMBACKDROP_TYPE = 30,
WCA_SET_TAGGED_WINDOW_RECT = 31,
WCA_CLEAR_TAGGED_WINDOW_RECT = 32,
WCA_LAST = 33,
} WINDOWCOMPOSITIONATTRIB;
typedef struct tagWINDOWCOMPOSITIONATTRIBDATA
{
WINDOWCOMPOSITIONATTRIB Attrib;
void* pvData;
unsigned int cbData;
} WINDOWCOMPOSITIONATTRIBDATA;
typedef enum ACCENT_STATE
{
ACCENT_DISABLED = 0,
ACCENT_ENABLE_GRADIENT = 1,
ACCENT_ENABLE_TRANSPARENTGRADIENT = 2,
ACCENT_ENABLE_BLURBEHIND = 3,
ACCENT_ENABLE_ACRYLICBLURBEHIND = 4,
ACCENT_ENABLE_HOSTBACKDROP = 5,
ACCENT_INVALID_STATE = 6,
} ACCENT_STATE;
typedef struct ACCENT_POLICY
{
ACCENT_STATE AccentState;
unsigned int AccentFlags;
unsigned long GradientColor;
long AnimationId;
} ACCENT_POLICY;
namespace ABI::WindowsUdk::UI::Themes
{
enum class VisualTheme
{
Dark = 0,
Light = 1,
HighContrastBlack = 2,
HighContrastWhite = 3,
};
MIDL_INTERFACE("8f0a6c35-72ca-5f4a-a5fb-1a731ec8b514")
ISystemVisualThemeStatics : IInspectable
{
virtual HRESULT STDMETHODCALLTYPE get_Current(VisualTheme* value) = 0;
virtual HRESULT STDMETHODCALLTYPE add_Changed(void* handler, EventRegistrationToken* token) = 0;
virtual HRESULT STDMETHODCALLTYPE remove_Changed(EventRegistrationToken token) = 0;
};
}
struct TaskbarTheme
{
bool bColorPrevalence;
bool bEnableTransparency;
ABI::WindowsUdk::UI::Themes::VisualTheme visualTheme;
bool IsHighContrast() const
{
using namespace ABI::WindowsUdk::UI::Themes;
return visualTheme == VisualTheme::HighContrastBlack || visualTheme == VisualTheme::HighContrastWhite;
}
bool IsDark() const
{
using namespace ABI::WindowsUdk::UI::Themes;
return visualTheme == VisualTheme::Dark || visualTheme == VisualTheme::HighContrastBlack;
}
};
enum D3D_FEATURE_LEVEL : int;
struct COMPOSITION_CAPABILITY_INFO
{
D3D_FEATURE_LEVEL minSafeFeatureLevel;
D3D_FEATURE_LEVEL maxHardwareFeatureLevel;
int usingSoftwareDevice;
int areEffectsSupported;
int boostCompositorClockSupported; // Valid on 11 21H2+
};
typedef NTSTATUS (*NtDCompositionGetFrameStatistics_t)(DCOMPOSITION_FRAME_STATISTICS*, COMPOSITION_CAPABILITY_INFO*);
inline NTSTATUS NtDCompositionGetFrameStatistics(DCOMPOSITION_FRAME_STATISTICS* pStatistics, COMPOSITION_CAPABILITY_INFO* pCapabilities)
{
static NtDCompositionGetFrameStatistics_t f = nullptr;
if (!f)
{
HMODULE h = GetModuleHandleW(L"dcomp.dll");
if (h)
f = (NtDCompositionGetFrameStatistics_t)GetProcAddress(h, MAKEINTRESOURCEA(1046));
}
return f ? f(pStatistics, pCapabilities) : (NTSTATUS)0xC0000002L; // STATUS_NOT_IMPLEMENTED
}
bool ShouldApplyBlur()
{
DCOMPOSITION_FRAME_STATISTICS statistics;
COMPOSITION_CAPABILITY_INFO capabilities;
return NtDCompositionGetFrameStatistics(&statistics, &capabilities) >= 0 && capabilities.areEffectsSupported && !capabilities.usingSoftwareDevice;
}
TaskbarTheme GetTaskbarTheme()
{
TaskbarTheme rv;
// rv.visualTheme = winrt::WindowsUdk::UI::Themes::SystemVisualTheme::Current();
rv.visualTheme = ABI::WindowsUdk::UI::Themes::VisualTheme::Light;
Microsoft::WRL::ComPtr<ABI::WindowsUdk::UI::Themes::ISystemVisualThemeStatics> systemVisualTheme;
HRESULT hr = RoGetActivationFactory(
Microsoft::WRL::Wrappers::HStringReference(L"WindowsUdk.UI.Themes.SystemVisualTheme").Get(),
IID_PPV_ARGS(&systemVisualTheme)
);
if (SUCCEEDED_LOG(hr))
{
ABI::WindowsUdk::UI::Themes::VisualTheme theme;
if (SUCCEEDED_LOG(systemVisualTheme->get_Current(&theme)))
{
rv.visualTheme = theme;
}
}
DWORD bColorPrevalence = 0;
rv.bColorPrevalence =
SUCCEEDED(SHRegGetDWORD(
HKEY_CURRENT_USER,
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize",
L"ColorPrevalence",
&bColorPrevalence
)) && bColorPrevalence;
bool bApplyBlur = ShouldApplyBlur();
DWORD bEnableTransparency;
rv.bEnableTransparency = !rv.IsHighContrast() && bApplyBlur
&& SUCCEEDED(SHRegGetDWORD(
HKEY_CURRENT_USER,
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize",
L"EnableTransparency",
&bEnableTransparency
)) && bEnableTransparency;
return rv;
}
DWORD GetTaskbarColor()
{
TaskbarTheme tt = GetTaskbarTheme();
if (tt.IsHighContrast())
return GetSysColor(COLOR_WINDOW);
if (tt.bColorPrevalence)
{
DWORD result = CImmersiveColor::GetColor(tt.IsDark() ? IMCLR_SystemAccentDark2 : IMCLR_SystemAccentLight2);
if (tt.bEnableTransparency)
return (result & 0xFFFFFF) | 0xCC000000;
return result;
}
if (tt.IsDark())
return tt.bEnableTransparency ? 0x80202020 : 0xFF202020;
return tt.bEnableTransparency ? 0xF3F3F3 : 0xFFF3F3F3;
}
extern "C" void UpdateWindowAccentProperties_PatchAttribData(WINDOWCOMPOSITIONATTRIBDATA* pAttrData)
{
ACCENT_POLICY* pAccentPolicy = (ACCENT_POLICY*)pAttrData->pvData;
if (false) // STTest makes it like this:
{
pAccentPolicy->AccentState = ACCENT_ENABLE_TRANSPARENTGRADIENT;
pAccentPolicy->GradientColor = 0;
pAccentPolicy->AnimationId = 0;
}
else
{
pAccentPolicy->AccentState = GetTaskbarTheme().bEnableTransparency ? ACCENT_ENABLE_ACRYLICBLURBEHIND : ACCENT_ENABLE_GRADIENT;
pAccentPolicy->GradientColor = GetTaskbarColor();
pAccentPolicy->AnimationId = 0;
}
pAccentPolicy->AccentFlags = 0x1 | 0x2 | 0x10;
}
#pragma endregion

232
ExplorerPatcher/TaskbarCenter.c → ExplorerPatcher/TaskbarCenter.cpp

@ -1,12 +1,20 @@
#include "TaskbarCenter.h" #include "TaskbarCenter.h"
#include "../ep_weather_host/ep_weather_host_h.h"
#include <intrin.h>
extern "C"
{
DEFINE_GUID(POLID_TurnOffSPIAnimations, 0xD7AF00A, 0xB468, 0x4A39, 0xB0, 0x16, 0x33, 0x3E, 0x22, 0x77, 0xAB, 0xED); DEFINE_GUID(POLID_TurnOffSPIAnimations, 0xD7AF00A, 0xB468, 0x4A39, 0xB0, 0x16, 0x33, 0x3E, 0x22, 0x77, 0xAB, 0xED);
extern int(*SHWindowsPolicy)(REFIID); extern int(*SHWindowsPolicy)(REFIID);
extern HWND PeopleButton_LastHWND; extern HWND PeopleButton_LastHWND;
extern DWORD dwWeatherToLeft; extern DWORD dwWeatherToLeft;
extern DWORD dwOldTaskbarAl; extern DWORD dwOldTaskbarAl;
extern DWORD dwMMOldTaskbarAl; extern DWORD dwMMOldTaskbarAl;
extern DWORD dwSearchboxTaskbarMode;
extern wchar_t* EP_TASKBAR_LENGTH_PROP_NAME; extern wchar_t* EP_TASKBAR_LENGTH_PROP_NAME;
extern IEPWeather* epw;
#define EP_TASKBAR_LENGTH_TOO_SMALL 20 #define EP_TASKBAR_LENGTH_TOO_SMALL 20
BOOL bTaskbarCenterHasPatchedSHWindowsPolicy = FALSE; BOOL bTaskbarCenterHasPatchedSHWindowsPolicy = FALSE;
UINT atomPeopleBand = 0; UINT atomPeopleBand = 0;
@ -20,11 +28,11 @@ HRESULT TaskbarCenter_Center(HWND hWnd, HWND hWndTaskbar, RECT rc, BOOL bIsTaskb
VARIANT vt; VARIANT vt;
long k = 0, kk = 0; long k = 0, kk = 0;
IAccessible* pAccessible = NULL; IAccessible* pAccessible = nullptr;
AccessibleObjectFromWindow(hWnd, 0, &IID_IAccessible, &pAccessible); AccessibleObjectFromWindow(hWnd, 0, IID_PPV_ARGS(&pAccessible));
if (pAccessible) if (pAccessible)
{ {
pAccessible->lpVtbl->get_accChildCount(pAccessible, &kk); pAccessible->get_accChildCount(&kk);
if (kk <= 10) if (kk <= 10)
{ {
AccessibleChildren(pAccessible, 0, kk, vtChild, &k); AccessibleChildren(pAccessible, 0, kk, vtChild, &k);
@ -32,29 +40,29 @@ HRESULT TaskbarCenter_Center(HWND hWnd, HWND hWndTaskbar, RECT rc, BOOL bIsTaskb
{ {
if (vtChild[i].vt == VT_DISPATCH) if (vtChild[i].vt == VT_DISPATCH)
{ {
IDispatch* pDisp = vtChild[i].ppdispVal; IDispatch* pDisp = vtChild[i].pdispVal;
IAccessible* pChild = NULL; IAccessible* pChild = nullptr;
pDisp->lpVtbl->QueryInterface(pDisp, &IID_IAccessible, &pChild); pDisp->QueryInterface(IID_PPV_ARGS(&pChild));
if (pChild) if (pChild)
{ {
vt.vt = VT_I4; vt.vt = VT_I4;
vt.lVal = CHILDID_SELF; vt.lVal = CHILDID_SELF;
pChild->lpVtbl->get_accRole(pChild, vt, &vt); pChild->get_accRole(vt, &vt);
if (vt.lVal == ROLE_SYSTEM_TOOLBAR) if (vt.lVal == ROLE_SYSTEM_TOOLBAR)
{ {
IAccessible* pLast = NULL; IAccessible* pLast = nullptr;
kk = 0; kk = 0;
pChild->lpVtbl->get_accChildCount(pChild, &kk); pChild->get_accChildCount(&kk);
if (kk <= 1) if (kk <= 1)
{ {
SetPropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME, -1); SetPropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME, (HANDLE)-1);
} }
else if (kk >= 2) else if (kk >= 2)
{ {
vt.vt = VT_I4; vt.vt = VT_I4;
vt.lVal = kk - 1; vt.lVal = kk - 1;
long x = 0, y = 0, w = 0, h = 0, d = 0; long x = 0, y = 0, w = 0, h = 0, d = 0;
pChild->lpVtbl->accLocation(pChild, &x, &y, &w, &h, vt); pChild->accLocation(&x, &y, &w, &h, vt);
if (bIsTaskbarHorizontal ? (x == -1 || w < EP_TASKBAR_LENGTH_TOO_SMALL) : (y == -1 || h < EP_TASKBAR_LENGTH_TOO_SMALL)) if (bIsTaskbarHorizontal ? (x == -1 || w < EP_TASKBAR_LENGTH_TOO_SMALL) : (y == -1 || h < EP_TASKBAR_LENGTH_TOO_SMALL))
{ {
hr = E_FAIL; hr = E_FAIL;
@ -67,23 +75,23 @@ HRESULT TaskbarCenter_Center(HWND hWnd, HWND hWndTaskbar, RECT rc, BOOL bIsTaskb
vt.vt = VT_I4; vt.vt = VT_I4;
vt.lVal = 1; vt.lVal = 1;
x = 0, y = 0, w = 0, h = 0; x = 0, y = 0, w = 0, h = 0;
pChild->lpVtbl->accLocation(pChild, &x, &y, &w, &h, vt); pChild->accLocation(&x, &y, &w, &h, vt);
if (bIsTaskbarHorizontal ? w == 0 : h == 0) if (bIsTaskbarHorizontal ? w == 0 : h == 0)
{ {
vt.vt = VT_I4; vt.vt = VT_I4;
vt.lVal = 2; vt.lVal = 2;
x = 0, y = 0, w = 0, h = 0; x = 0, y = 0, w = 0, h = 0;
pChild->lpVtbl->accLocation(pChild, &x, &y, &w, &h, vt); pChild->accLocation(&x, &y, &w, &h, vt);
} }
if (bIsTaskbarHorizontal ? (x == -1 || w < EP_TASKBAR_LENGTH_TOO_SMALL) : (y == -1 || h < EP_TASKBAR_LENGTH_TOO_SMALL)) if (bIsTaskbarHorizontal ? (x == -1 || w < EP_TASKBAR_LENGTH_TOO_SMALL) : (y == -1 || h < EP_TASKBAR_LENGTH_TOO_SMALL))
{ {
hr == E_FAIL; hr = E_FAIL;
} }
else else
{ {
if (!((GetKeyState(VK_LBUTTON) < 0) && (GetForegroundWindow() == hWndTaskbar))) if (!((GetKeyState(VK_LBUTTON) < 0) && (GetForegroundWindow() == hWndTaskbar)))
{ {
SetPropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME, (bIsTaskbarHorizontal ? (d - (x - rc.left)) : (d - (y - rc.top)))); SetPropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME, (HANDLE)(UINT_PTR)(bIsTaskbarHorizontal ? (d - (x - rc.left)) : (d - (y - rc.top))));
} }
} }
} }
@ -91,19 +99,19 @@ HRESULT TaskbarCenter_Center(HWND hWnd, HWND hWndTaskbar, RECT rc, BOOL bIsTaskb
{ {
if (!((GetKeyState(VK_LBUTTON) < 0) && (GetForegroundWindow() == hWndTaskbar))) if (!((GetKeyState(VK_LBUTTON) < 0) && (GetForegroundWindow() == hWndTaskbar)))
{ {
SetPropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME, bIsTaskbarHorizontal ? w : h); SetPropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME, (HANDLE)(UINT_PTR)(bIsTaskbarHorizontal ? w : h));
} }
} }
} }
} }
} }
pChild->lpVtbl->Release(pChild); pChild->Release();
} }
pDisp->lpVtbl->Release(pDisp); pDisp->Release();
} }
} }
} }
pAccessible->lpVtbl->Release(pAccessible); pAccessible->Release();
} }
return hr; return hr;
} }
@ -111,42 +119,52 @@ HRESULT TaskbarCenter_Center(HWND hWnd, HWND hWndTaskbar, RECT rc, BOOL bIsTaskb
BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect) BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
{ {
BOOL bWasCalled = FALSE; BOOL bWasCalled = FALSE;
HWND hWndStart = NULL;
RECT rcStart;
SetRect(&rcStart, 0, 0, 0, 0);
if (!atomMSTaskListWClass) atomMSTaskListWClass = RegisterWindowMessageW(L"MSTaskListWClass"); if (!atomMSTaskListWClass) atomMSTaskListWClass = RegisterWindowMessageW(L"MSTaskListWClass");
if (GetClassWord(hWnd, GCW_ATOM) == atomMSTaskListWClass) if (GetClassWord(hWnd, GCW_ATOM) == atomMSTaskListWClass)
{ {
if (!atomMSTaskSwWClass) atomMSTaskSwWClass = RegisterWindowMessageW(L"MSTaskSwWClass"); if (!atomMSTaskSwWClass) atomMSTaskSwWClass = RegisterWindowMessageW(L"MSTaskSwWClass");
BOOL bIsPrimaryTaskbar = (GetClassWord(GetParent(hWnd), GCW_ATOM) == atomMSTaskSwWClass); HWND hwndParent = GetParent(hWnd);
BOOL bIsPrimaryTaskbar = (GetClassWord(hwndParent, GCW_ATOM) == atomMSTaskSwWClass);
DWORD dwSetting = (bIsPrimaryTaskbar ? dwOldTaskbarAl : dwMMOldTaskbarAl); DWORD dwSetting = (bIsPrimaryTaskbar ? dwOldTaskbarAl : dwMMOldTaskbarAl);
HWND hWndTaskbar = NULL; BOOL bCenteringEnabled = TaskbarCenter_ShouldCenter(dwSetting);
if (!bCenteringEnabled && GetPropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME))
{
RemovePropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME);
}
if (!bCenteringEnabled && !epw)
{
return GetClientRect(hWnd, lpRect); // Early out
}
HWND hWndStart = nullptr;
RECT rcStart = { 0, 0, 0, 0 };
HWND hWndTaskbar = nullptr;
if (bIsPrimaryTaskbar) if (bIsPrimaryTaskbar)
{ {
hWndTaskbar = GetParent(GetParent(GetParent(hWnd))); hWndTaskbar = GetParent(GetParent(hwndParent));
} }
else else
{ {
hWndTaskbar = GetParent(GetParent(hWnd)); hWndTaskbar = GetParent(hwndParent);
} }
hWndStart = FindWindowExW(hWndTaskbar, NULL, L"Start", NULL); hWndStart = FindWindowExW(hWndTaskbar, nullptr, L"Start", nullptr);
BOOL bIsTaskbarHorizontal = TaskbarCenter_IsTaskbarHorizontal(hWnd); BOOL bIsTaskbarHorizontal = TaskbarCenter_IsTaskbarHorizontal(hWnd);
BOOL bIsWeatherAvailable = FALSE; HWND hReBarWindow32 = nullptr;
HWND hReBarWindow32 = NULL; if (bIsPrimaryTaskbar) hReBarWindow32 = FindWindowExW(hWndTaskbar, nullptr, L"ReBarWindow32", nullptr);
if (bIsPrimaryTaskbar) hReBarWindow32 = FindWindowExW(hWndTaskbar, NULL, L"ReBarWindow32", NULL); HWND hPeopleBand = nullptr;
HWND hPeopleBand = NULL; if (bIsPrimaryTaskbar) hPeopleBand = FindWindowExW(hReBarWindow32, nullptr, L"PeopleBand", nullptr);
if (bIsPrimaryTaskbar) hPeopleBand = FindWindowExW(hReBarWindow32, NULL, L"PeopleBand", NULL); BOOL bIsWeatherAvailable = hPeopleBand && dwWeatherToLeft;
bIsWeatherAvailable = hPeopleBand && dwWeatherToLeft;
BOOL bWasLeftAlignedDueToSpaceConstraints = FALSE; BOOL bWasLeftAlignedDueToSpaceConstraints = FALSE;
if (TaskbarCenter_ShouldCenter(dwSetting)) if (bCenteringEnabled)
{ {
if (hWndStart) if (hWndStart)
{ {
GetClientRect(hWndStart, &rcStart); GetClientRect(hWndStart, &rcStart);
HWND hTrayButton = NULL; HWND hTrayButton = nullptr;
while (hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, L"TrayButton", NULL)) const wchar_t* pCn = L"TrayButton";
if (/*!IsWindows11() &&*/ dwSearchboxTaskbarMode == 2) pCn = L"TrayDummySearchControl";
while ((hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, pCn, nullptr)))
{ {
if (!IsWindowVisible(hTrayButton)) continue; if (pCn == L"TrayButton" && !IsWindowVisible(hTrayButton)) continue;
RECT rcTrayButton; RECT rcTrayButton;
GetClientRect(hTrayButton, &rcTrayButton); GetClientRect(hTrayButton, &rcTrayButton);
if (bIsTaskbarHorizontal) if (bIsTaskbarHorizontal)
@ -157,6 +175,10 @@ BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
{ {
rcStart.bottom += (rcTrayButton.bottom - rcTrayButton.top); rcStart.bottom += (rcTrayButton.bottom - rcTrayButton.top);
} }
if (pCn == L"TrayDummySearchControl") {
pCn = L"TrayButton";
hTrayButton = nullptr;
}
} }
} }
RECT rc; RECT rc;
@ -165,9 +187,9 @@ BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
ZeroMemory(&mi, sizeof(MONITORINFO)); ZeroMemory(&mi, sizeof(MONITORINFO));
mi.cbSize = sizeof(MONITORINFO); mi.cbSize = sizeof(MONITORINFO);
GetMonitorInfoW(MonitorFromWindow(hWnd, MONITOR_DEFAULTTOPRIMARY), &mi); GetMonitorInfoW(MonitorFromWindow(hWnd, MONITOR_DEFAULTTOPRIMARY), &mi);
DWORD dwLength = 0; long dwLength = 0;
TaskbarCenter_Center(hWnd, hWndTaskbar, mi.rcMonitor, bIsTaskbarHorizontal); TaskbarCenter_Center(hWnd, hWndTaskbar, mi.rcMonitor, bIsTaskbarHorizontal);
if (dwLength = GetPropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME)) if ((dwLength = (long)(UINT_PTR)GetPropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME)))
{ {
if (dwLength == -1) if (dwLength == -1)
{ {
@ -175,45 +197,55 @@ BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
{ {
if (bIsTaskbarHorizontal) if (bIsTaskbarHorizontal)
{ {
SetWindowPos(hWndStart, NULL, ((mi.rcMonitor.right - mi.rcMonitor.left) - (rcStart.right - rcStart.left)) / 2, rcStart.top, 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS); SetWindowPos(hWndStart, nullptr, ((mi.rcMonitor.right - mi.rcMonitor.left) - (rcStart.right - rcStart.left)) / 2, rcStart.top, 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS);
RECT rcTrayButton; RECT rcTrayButton;
GetClientRect(hWndStart, &rcTrayButton); GetClientRect(hWndStart, &rcTrayButton);
DWORD dwDim = (rcTrayButton.right - rcTrayButton.left); DWORD dwDim = (rcTrayButton.right - rcTrayButton.left);
HWND hTrayButton = NULL; HWND hTrayButton = nullptr;
while (hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, L"TrayButton", NULL)) const wchar_t* pCn = L"TrayButton";
if (/*!IsWindows11() &&*/ dwSearchboxTaskbarMode == 2) pCn = L"TrayDummySearchControl";
while ((hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, pCn, nullptr)))
{ {
if (!IsWindowVisible(hTrayButton)) continue; if (pCn == L"TrayButton" && !IsWindowVisible(hTrayButton)) continue;
GetClientRect(hTrayButton, &rcTrayButton); GetClientRect(hTrayButton, &rcTrayButton);
MoveWindow(hTrayButton, ((mi.rcMonitor.right - mi.rcMonitor.left) - (rcStart.right - rcStart.left)) / 2 + dwDim, rcStart.top, rcTrayButton.right, rcTrayButton.bottom, TRUE); MoveWindow(hTrayButton, ((mi.rcMonitor.right - mi.rcMonitor.left) - (rcStart.right - rcStart.left)) / 2 + dwDim, rcStart.top, rcTrayButton.right, rcTrayButton.bottom, TRUE);
if (!bIsPrimaryTaskbar) InvalidateRect(hTrayButton, NULL, TRUE); if (!bIsPrimaryTaskbar) InvalidateRect(hTrayButton, nullptr, TRUE);
dwDim += (rcTrayButton.right - rcTrayButton.left); dwDim += (rcTrayButton.right - rcTrayButton.left);
if (pCn == L"TrayDummySearchControl") {
pCn = L"TrayButton";
hTrayButton = nullptr;
}
} }
} }
else else
{ {
SetWindowPos(hWndStart, NULL, rcStart.left, ((mi.rcMonitor.bottom - mi.rcMonitor.top) - (rcStart.bottom - rcStart.top)) / 2, 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS); SetWindowPos(hWndStart, nullptr, rcStart.left, ((mi.rcMonitor.bottom - mi.rcMonitor.top) - (rcStart.bottom - rcStart.top)) / 2, 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS);
RECT rcTrayButton; RECT rcTrayButton;
GetClientRect(hWndStart, &rcTrayButton); GetClientRect(hWndStart, &rcTrayButton);
DWORD dwDim = (rcTrayButton.bottom - rcTrayButton.top); DWORD dwDim = (rcTrayButton.bottom - rcTrayButton.top);
HWND hTrayButton = NULL; HWND hTrayButton = nullptr;
while (hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, L"TrayButton", NULL)) const wchar_t* pCn = L"TrayButton";
if (/*!IsWindows11() &&*/ dwSearchboxTaskbarMode == 2) pCn = L"TrayDummySearchControl";
while ((hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, pCn, nullptr)))
{ {
if (!IsWindowVisible(hTrayButton)) continue; if (pCn == L"TrayButton" && !IsWindowVisible(hTrayButton)) continue;
GetClientRect(hTrayButton, &rcTrayButton); GetClientRect(hTrayButton, &rcTrayButton);
MoveWindow(hTrayButton, rcStart.left, ((mi.rcMonitor.bottom - mi.rcMonitor.top) - (rcStart.bottom - rcStart.top)) / 2 + dwDim, rcTrayButton.right, rcTrayButton.bottom, TRUE); MoveWindow(hTrayButton, rcStart.left, ((mi.rcMonitor.bottom - mi.rcMonitor.top) - (rcStart.bottom - rcStart.top)) / 2 + dwDim, rcTrayButton.right, rcTrayButton.bottom, TRUE);
InvalidateRect(hTrayButton, NULL, TRUE); InvalidateRect(hTrayButton, nullptr, TRUE);
dwDim += (rcTrayButton.bottom - rcTrayButton.top); dwDim += (rcTrayButton.bottom - rcTrayButton.top);
if (pCn == L"TrayDummySearchControl") {
pCn = L"TrayButton";
hTrayButton = nullptr;
}
} }
} }
if (!bIsPrimaryTaskbar) InvalidateRect(hWndStart, NULL, TRUE); if (!bIsPrimaryTaskbar) InvalidateRect(hWndStart, nullptr, TRUE);
} }
} }
else else
{ {
RECT rcPeopleBand; RECT rcPeopleBand = { 0, 0, 0, 0 };
SetRect(&rcPeopleBand, 0, 0, 0, 0); RECT rcReBarWindow32 = { 0, 0, 0, 0 };
RECT rcReBarWindow32;
SetRect(&rcReBarWindow32, 0, 0, 0, 0);
if (hPeopleBand) if (hPeopleBand)
{ {
GetClientRect(hPeopleBand, &rcPeopleBand); GetClientRect(hPeopleBand, &rcPeopleBand);
@ -236,7 +268,7 @@ BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
// rc.left += mBand.cxLeftWidth; // rc.left += mBand.cxLeftWidth;
//} //}
DWORD dwAdd = 0; long dwAdd = 0;
if (TaskbarCenter_ShouldStartBeCentered(dwSetting) && hWndStart) if (TaskbarCenter_ShouldStartBeCentered(dwSetting) && hWndStart)
{ {
dwAdd += (bIsTaskbarHorizontal ? (rcStart.right - rcStart.left) : (rcStart.bottom - rcStart.top)); dwAdd += (bIsTaskbarHorizontal ? (rcStart.right - rcStart.left) : (rcStart.bottom - rcStart.top));
@ -305,49 +337,54 @@ BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
{ {
if (bIsTaskbarHorizontal) if (bIsTaskbarHorizontal)
{ {
SetWindowPos(hWndStart, NULL, (rc.left - mi.rcMonitor.left) + lpRect->left - (rcStart.right - rcStart.left), rcStart.top, 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS); SetWindowPos(hWndStart, nullptr, (rc.left - mi.rcMonitor.left) + lpRect->left - (rcStart.right - rcStart.left), rcStart.top, 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS);
RECT rcTrayButton; RECT rcTrayButton;
GetClientRect(hWndStart, &rcTrayButton); GetClientRect(hWndStart, &rcTrayButton);
DWORD dwDim = (rcTrayButton.right - rcTrayButton.left); DWORD dwDim = (rcTrayButton.right - rcTrayButton.left);
HWND hTrayButton = NULL; HWND hTrayButton = nullptr;
while (hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, L"TrayButton", NULL)) const wchar_t* pCn = L"TrayButton";
if (/*!IsWindows11() &&*/ dwSearchboxTaskbarMode == 2) pCn = L"TrayDummySearchControl";
while ((hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, pCn, nullptr)))
{ {
if (!IsWindowVisible(hTrayButton)) continue; if (pCn == L"TrayButton" && !IsWindowVisible(hTrayButton)) continue;
GetClientRect(hTrayButton, &rcTrayButton); GetClientRect(hTrayButton, &rcTrayButton);
MoveWindow(hTrayButton, (rc.left - mi.rcMonitor.left) + lpRect->left - (rcStart.right - rcStart.left) + dwDim, rcStart.top, rcTrayButton.right, rcTrayButton.bottom, TRUE); MoveWindow(hTrayButton, (rc.left - mi.rcMonitor.left) + lpRect->left - (rcStart.right - rcStart.left) + dwDim, rcStart.top, rcTrayButton.right, rcTrayButton.bottom, TRUE);
if (!bIsPrimaryTaskbar) InvalidateRect(hTrayButton, NULL, TRUE); if (!bIsPrimaryTaskbar) InvalidateRect(hTrayButton, nullptr, TRUE);
dwDim += (rcTrayButton.right - rcTrayButton.left); dwDim += (rcTrayButton.right - rcTrayButton.left);
if (pCn == L"TrayDummySearchControl") {
pCn = L"TrayButton";
hTrayButton = nullptr;
}
} }
} }
else else
{ {
SetWindowPos(hWndStart, NULL, rcStart.left, (rc.top - mi.rcMonitor.top) + lpRect->top - (rcStart.bottom - rcStart.top), 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS); SetWindowPos(hWndStart, nullptr, rcStart.left, (rc.top - mi.rcMonitor.top) + lpRect->top - (rcStart.bottom - rcStart.top), 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS);
RECT rcTrayButton; RECT rcTrayButton;
GetClientRect(hWndStart, &rcTrayButton); GetClientRect(hWndStart, &rcTrayButton);
DWORD dwDim = (rcTrayButton.bottom - rcTrayButton.top); DWORD dwDim = (rcTrayButton.bottom - rcTrayButton.top);
HWND hTrayButton = NULL; HWND hTrayButton = nullptr;
while (hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, L"TrayButton", NULL)) const wchar_t* pCn = L"TrayButton";
if (/*!IsWindows11() &&*/ dwSearchboxTaskbarMode == 2) pCn = L"TrayDummySearchControl";
while ((hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, pCn, nullptr)))
{ {
if (!IsWindowVisible(hTrayButton)) continue; if (pCn == L"TrayButton" && !IsWindowVisible(hTrayButton)) continue;
GetClientRect(hTrayButton, &rcTrayButton); GetClientRect(hTrayButton, &rcTrayButton);
MoveWindow(hTrayButton, rcStart.left, (rc.top - mi.rcMonitor.top) + lpRect->top - (rcStart.bottom - rcStart.top) + dwDim, rcTrayButton.right, rcTrayButton.bottom, TRUE); MoveWindow(hTrayButton, rcStart.left, (rc.top - mi.rcMonitor.top) + lpRect->top - (rcStart.bottom - rcStart.top) + dwDim, rcTrayButton.right, rcTrayButton.bottom, TRUE);
InvalidateRect(hTrayButton, NULL, TRUE); InvalidateRect(hTrayButton, nullptr, TRUE);
dwDim += (rcTrayButton.bottom - rcTrayButton.top); dwDim += (rcTrayButton.bottom - rcTrayButton.top);
if (pCn == L"TrayDummySearchControl") {
pCn = L"TrayButton";
hTrayButton = nullptr;
} }
} }
if (!bIsPrimaryTaskbar) InvalidateRect(hWndStart, NULL, TRUE);
}
} }
if (!bIsPrimaryTaskbar) InvalidateRect(hWndStart, nullptr, TRUE);
} }
} }
else
{
if (GetPropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME))
{
RemovePropW(hWnd, EP_TASKBAR_LENGTH_PROP_NAME);
} }
} }
if (bIsPrimaryTaskbar) if (bIsPrimaryTaskbar && epw)
{ {
BOOL bWeatherAlignment = FALSE; BOOL bWeatherAlignment = FALSE;
if (bIsWeatherAvailable) if (bIsWeatherAvailable)
@ -367,12 +404,12 @@ BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
ZeroMemory(&rbi, sizeof(REBARBANDINFOW)); ZeroMemory(&rbi, sizeof(REBARBANDINFOW));
rbi.cbSize = sizeof(REBARBANDINFOW); rbi.cbSize = sizeof(REBARBANDINFOW);
rbi.fMask = RBBIM_CHILD; rbi.fMask = RBBIM_CHILD;
SendMessageW(hReBarWindow32, RB_GETBANDINFOW, 0, &rbi); SendMessageW(hReBarWindow32, RB_GETBANDINFOW, 0, (LPARAM)&rbi);
BOOL bIsFirstBandPeopleBand = (GetClassWord(rbi.hwndChild, GCW_ATOM) == atomPeopleBand); BOOL bIsFirstBandPeopleBand = (GetClassWord(rbi.hwndChild, GCW_ATOM) == atomPeopleBand);
if (bWeatherAlignment ? !bIsFirstBandPeopleBand : bIsFirstBandPeopleBand) if (bWeatherAlignment ? !bIsFirstBandPeopleBand : bIsFirstBandPeopleBand)
{ {
int s = 0; int s = 0;
int k = SendMessageW(hReBarWindow32, RB_GETBANDCOUNT, 0, 0); int k = (int)SendMessageW(hReBarWindow32, RB_GETBANDCOUNT, 0, 0);
if (bWeatherAlignment) if (bWeatherAlignment)
{ {
for (int i = k - 1; i >= 0; i--) for (int i = k - 1; i >= 0; i--)
@ -382,7 +419,7 @@ BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
ZeroMemory(&rbi, sizeof(REBARBANDINFOW)); ZeroMemory(&rbi, sizeof(REBARBANDINFOW));
rbi.cbSize = sizeof(REBARBANDINFOW); rbi.cbSize = sizeof(REBARBANDINFOW);
rbi.fMask = RBBIM_CHILD; rbi.fMask = RBBIM_CHILD;
SendMessageW(hReBarWindow32, RB_GETBANDINFOW, i, &rbi); SendMessageW(hReBarWindow32, RB_GETBANDINFOW, i, (LPARAM)&rbi);
if (rbi.hwndChild && (GetClassWord(rbi.hwndChild, GCW_ATOM) == atomPeopleBand)) if (rbi.hwndChild && (GetClassWord(rbi.hwndChild, GCW_ATOM) == atomPeopleBand))
{ {
s = 1; s = 1;
@ -404,17 +441,16 @@ BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
SendNotifyMessageW(HWND_BROADCAST, WM_WININICHANGE, 0, (LPARAM)L"TraySettings"); SendNotifyMessageW(HWND_BROADCAST, WM_WININICHANGE, 0, (LPARAM)L"TraySettings");
} }
} }
int k = SendMessageW(hReBarWindow32, RB_GETBANDCOUNT, 0, 0); int k = (int)SendMessageW(hReBarWindow32, RB_GETBANDCOUNT, 0, 0);
for (int i = 0; i < k - 1; ++i) for (int i = 0; i < k - 1; ++i)
{ {
ZeroMemory(&rbi, sizeof(REBARBANDINFOW)); ZeroMemory(&rbi, sizeof(REBARBANDINFOW));
rbi.cbSize = sizeof(REBARBANDINFOW); rbi.cbSize = sizeof(REBARBANDINFOW);
rbi.fMask = RBBIM_CHILD | RBBIM_CHILDSIZE; rbi.fMask = RBBIM_CHILD | RBBIM_CHILDSIZE;
SendMessageW(hReBarWindow32, RB_GETBANDINFOW, i, &rbi); SendMessageW(hReBarWindow32, RB_GETBANDINFOW, i, (LPARAM)&rbi);
if (rbi.hwndChild && (GetClassWord(rbi.hwndChild, GCW_ATOM) == atomPeopleBand)) if (rbi.hwndChild && (GetClassWord(rbi.hwndChild, GCW_ATOM) == atomPeopleBand))
{ {
RECT rcpp; RECT rcpp = { 0, 0, 0, 0 };
SetRect(&rcpp, 0, 0, 0, 0);
GetClientRect(rbi.hwndChild, &rcpp); GetClientRect(rbi.hwndChild, &rcpp);
if (rcpp.right && rcpp.bottom) if (rcpp.right && rcpp.bottom)
{ {
@ -431,34 +467,6 @@ BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
} }
} }
} }
if ((!TaskbarCenter_ShouldCenter(dwSetting) || !TaskbarCenter_ShouldStartBeCentered(dwSetting)) && hWndStart)
{
GetWindowRect(hWndStart, &rcStart);
if (rcStart.left != 0 || rcStart.top != 0)
{
SetWindowPos(hWndStart, NULL, 0, 0, 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED | SWP_ASYNCWINDOWPOS);
if (!bIsPrimaryTaskbar) InvalidateRect(hWndStart, NULL, TRUE);
RECT rcTrayButton;
GetClientRect(hWndStart, &rcTrayButton);
DWORD dwDim = bIsTaskbarHorizontal ? (rcTrayButton.right - rcTrayButton.left) : (rcTrayButton.bottom - rcTrayButton.top);
HWND hTrayButton = NULL;
while (hTrayButton = FindWindowExW(hWndTaskbar, hTrayButton, L"TrayButton", NULL))
{
if (!IsWindowVisible(hTrayButton)) continue;
GetClientRect(hTrayButton, &rcTrayButton);
if (bIsTaskbarHorizontal)
{
MoveWindow(hTrayButton, dwDim, 0, rcTrayButton.right, rcTrayButton.bottom, TRUE);
}
else
{
MoveWindow(hTrayButton, 0, dwDim, rcTrayButton.right, rcTrayButton.bottom, TRUE);
}
if (!bIsPrimaryTaskbar || !bIsTaskbarHorizontal) InvalidateRect(hTrayButton, NULL, TRUE);
dwDim += bIsTaskbarHorizontal ? (rcTrayButton.right - rcTrayButton.left) : (rcTrayButton.bottom - rcTrayButton.top);
}
}
}
} }
if (bWasCalled) return bWasCalled; if (bWasCalled) return bWasCalled;
return GetClientRect(hWnd, lpRect); return GetClientRect(hWnd, lpRect);
@ -466,7 +474,7 @@ BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect)
BOOL TaskbarCenter_SHWindowsPolicy(REFIID riid) BOOL TaskbarCenter_SHWindowsPolicy(REFIID riid)
{ {
if (IsEqualIID(riid, &POLID_TurnOffSPIAnimations) && (TaskbarCenter_ShouldCenter(dwOldTaskbarAl) || TaskbarCenter_ShouldCenter(dwMMOldTaskbarAl))) if (IsEqualIID(riid, POLID_TurnOffSPIAnimations) && (TaskbarCenter_ShouldCenter(dwOldTaskbarAl) || TaskbarCenter_ShouldCenter(dwMMOldTaskbarAl)))
{ {
DWORD flOldProtect = 0; DWORD flOldProtect = 0;
if (!bTaskbarCenterHasPatchedSHWindowsPolicy && *((unsigned char*)_ReturnAddress() + 7) == 0x0F) if (!bTaskbarCenterHasPatchedSHWindowsPolicy && *((unsigned char*)_ReturnAddress() + 7) == 0x0F)
@ -478,8 +486,8 @@ BOOL TaskbarCenter_SHWindowsPolicy(REFIID riid)
} }
else if (*((unsigned char*)_ReturnAddress() + 8) == 0x84 && VirtualProtect((unsigned char*)_ReturnAddress() + 13, 2, PAGE_EXECUTE_READWRITE, &flOldProtect)) else if (*((unsigned char*)_ReturnAddress() + 8) == 0x84 && VirtualProtect((unsigned char*)_ReturnAddress() + 13, 2, PAGE_EXECUTE_READWRITE, &flOldProtect))
{ {
*((unsigned char*)_ReturnAddress() + 13) += 0x90; *((unsigned char*)_ReturnAddress() + 13) = 0x90;
*((unsigned char*)_ReturnAddress() + 13) += 0x90; *((unsigned char*)_ReturnAddress() + 14) = 0x90;
VirtualProtect((unsigned char*)_ReturnAddress() + 13, 2, flOldProtect, &flOldProtect); VirtualProtect((unsigned char*)_ReturnAddress() + 13, 2, flOldProtect, &flOldProtect);
} }
bTaskbarCenterHasPatchedSHWindowsPolicy = TRUE; bTaskbarCenterHasPatchedSHWindowsPolicy = TRUE;
@ -488,3 +496,5 @@ BOOL TaskbarCenter_SHWindowsPolicy(REFIID riid)
} }
return SHWindowsPolicy(riid); return SHWindowsPolicy(riid);
} }
} // extern "C"

95
ExplorerPatcher/TaskbarCenter.h

@ -1,5 +1,5 @@
#ifndef _H_TASKBARCENTER_H_ #pragma once
#define _H_TASKBARCENTER_H_
#include <initguid.h> #include <initguid.h>
#include <Windows.h> #include <Windows.h>
#include <oleacc.h> #include <oleacc.h>
@ -12,17 +12,91 @@
#define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MIN(a,b) ((a) < (b) ? (a) : (b))
#define MIN_DIM 600 #define MIN_DIM 600
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
interface ITaskGroup;
interface ITaskItem;
interface ITaskBtnGroup;
MIDL_INTERFACE("e587c396-8ac9-49b7-a16c-e2acfd140399")
ITaskListSite : IUnknown
{
virtual HRESULT STDMETHODCALLTYPE GetGroupLocation(ITaskGroup*, ITaskItem*, int, RECT*) = 0;
virtual DWORD STDMETHODCALLTYPE GetStuckPlace() const = 0;
virtual void STDMETHODCALLTYPE SwitchToItem(ITaskItem*) = 0;
virtual void STDMETHODCALLTYPE CloseItem(ITaskItem*) = 0;
virtual void STDMETHODCALLTYPE OnContextMenu(POINT, HWND, bool, ITaskGroup*, ITaskItem*) = 0;
virtual void STDMETHODCALLTYPE SetHotItem(ITaskItem*) = 0;
virtual void STDMETHODCALLTYPE HandleMouseEnter(int) = 0;
virtual void STDMETHODCALLTYPE HandleMouseLeave(int) = 0;
virtual void STDMETHODCALLTYPE NotifyExtendedUIDismissed(int, ITaskItem*) = 0;
virtual void STDMETHODCALLTYPE DisableToolTip(int) = 0;
virtual int STDMETHODCALLTYPE GetIconId(ITaskGroup*, ITaskItem*) = 0;
virtual int STDMETHODCALLTYPE IsContextMenuActive() = 0;
virtual HWND STDMETHODCALLTYPE GetWindow() = 0;
virtual HRESULT STDMETHODCALLTYPE ShowLivePreview(ITaskItem*, DWORD) = 0;
virtual int STDMETHODCALLTYPE IsLivePreviewActive() = 0;
virtual int STDMETHODCALLTYPE IsTaskTopLevelUI(ITaskItem*) = 0;
virtual int STDMETHODCALLTYPE IsTaskExtendedUI(ITaskBtnGroup*, ITaskItem*) = 0;
virtual HRESULT STDMETHODCALLTYPE GetHost(const GUID&, void**) = 0;
};
MIDL_INTERFACE("2be43f49-c23d-40d8-8092-2fb6577ee134")
ITaskListWndSite : IUnknown
{
virtual void STDMETHODCALLTYPE CheckSize(int) = 0;
virtual HRESULT STDMETHODCALLTYPE GetStuckPlace(DWORD*) = 0;
virtual HRESULT STDMETHODCALLTYPE GetTaskListUITheme(const WCHAR**) = 0;
virtual HRESULT STDMETHODCALLTYPE GetUserPreferences(DWORD*) = 0;
virtual int STDMETHODCALLTYPE HitTestForSizeableBorder(int, int) = 0;
virtual HRESULT STDMETHODCALLTYPE UnhideTray() = 0;
virtual HRESULT STDMETHODCALLTYPE SetScrollInfo(int, const SCROLLINFO&) = 0;
virtual HRESULT STDMETHODCALLTYPE GetScrollInfo(int, SCROLLINFO*) = 0;
virtual HRESULT STDMETHODCALLTYPE HandleScroll(int, UINT, int) = 0;
virtual int STDMETHODCALLTYPE IsHorizontal() = 0;
/*virtual int STDMETHODCALLTYPE IsFullHeightOfTray() = 0;
virtual void STDMETHODCALLTYPE UpdateTheme() = 0;
virtual SyncDisplayChangeFlags STDMETHODCALLTYPE SyncDisplayChange(SyncDisplayChangeFlags, CCoSimpleArray<UINT>&) = 0;
virtual void STDMETHODCALLTYPE ImmersiveShow() = 0;
virtual void STDMETHODCALLTYPE HandleImmersiveLauncherVisibilityChange(HMONITOR, bool) = 0;
virtual void STDMETHODCALLTYPE HandleSearchAppVisibilityChange(HMONITOR, bool) = 0;
virtual void STDMETHODCALLTYPE HandleTaskViewVisibilityChange(bool) = 0;
virtual bool STDMETHODCALLTYPE IsDesktopVisibleOnTrayMonitor() = 0;
virtual void STDMETHODCALLTYPE HandleJumpViewVisibilityChange(bool) = 0;
virtual void STDMETHODCALLTYPE HandleHoverUIVisibilityChange(bool) = 0;
virtual void STDMETHODCALLTYPE NotifyFeedsAboutTaskListUpdated() = 0;*/
};
inline BOOL TaskbarCenter_IsTaskbarHorizontal(HWND hWnd) inline BOOL TaskbarCenter_IsTaskbarHorizontal(HWND hWnd)
{ {
__int64 v1; BOOL bRet = FALSE;
__int64 result;
v1 = *((__int64*)GetWindowLongPtrW(hWnd, 0) + 13); void* pTaskListWnd = (void*)GetWindowLongPtrW(hWnd, 0);
result = 1i64; if (pTaskListWnd)
if (v1) {
return (*(__int64(__fastcall**)(__int64))(*(__int64*)v1 + 96))(v1); // Shift by sizeof(CImpWndProc)
return result; IUnknown* punkTaskListWnd = (IUnknown*)((PBYTE)pTaskListWnd + sizeof(void*) /*vtable*/ + sizeof(HWND) /*_hwnd*/);
ITaskListSite* pTaskListSite = nullptr;
if (SUCCEEDED(punkTaskListWnd->QueryInterface(IID_PPV_ARGS(&pTaskListSite))))
{
ITaskListWndSite* pHost = nullptr;
if (SUCCEEDED(pTaskListSite->GetHost(IID_PPV_ARGS(&pHost))))
{
bRet = pHost->IsHorizontal() != 0;
pHost->Release();
}
pTaskListSite->Release();
}
} }
return bRet;
}
#endif
inline BOOL TaskbarCenter_ShouldCenter(DWORD dwSetting) inline BOOL TaskbarCenter_ShouldCenter(DWORD dwSetting)
{ {
return (dwSetting & 0b001); return (dwSetting & 0b001);
@ -41,4 +115,7 @@ inline BOOL TaskbarCenter_ShouldLeftAlignWhenSpaceConstrained(DWORD dwSetting)
BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect); BOOL TaskbarCenter_GetClientRectHook(HWND hWnd, LPRECT lpRect);
BOOL TaskbarCenter_SHWindowsPolicy(REFIID riid); BOOL TaskbarCenter_SHWindowsPolicy(REFIID riid);
#ifdef __cplusplus
}
#endif #endif

3646
ExplorerPatcher/TwinUIPatches.cpp

File diff suppressed because it is too large Load Diff

10
ExplorerPatcher/def.h

@ -1,8 +1,8 @@
#ifndef _H_DEF_H_ #ifndef _H_DEF_H_
#define _H_DEF_H_ #define _H_DEF_H_
#define APPID L"Microsoft.Windows.Explorer" #define APPID L"Microsoft.Windows.Explorer"
#define REGPATH "SOFTWARE\\ExplorerPatcher" #define REGPATH "Software\\ExplorerPatcher"
#define REGPATH_OLD "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ExplorerPatcher" #define REGPATH_OLD "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ExplorerPatcher"
#define REGPATH_STARTMENU REGPATH_OLD #define REGPATH_STARTMENU REGPATH_OLD
#define SPECIAL_FOLDER CSIDL_PROGRAM_FILES #define SPECIAL_FOLDER CSIDL_PROGRAM_FILES
#define SPECIAL_FOLDER_LEGACY CSIDL_APPDATA #define SPECIAL_FOLDER_LEGACY CSIDL_APPDATA
@ -12,8 +12,12 @@
#define EP_CLSID_LITE "D17F1E1A-5919-4427-8F89-A1A8503CA3EB" #define EP_CLSID_LITE "D17F1E1A-5919-4427-8F89-A1A8503CA3EB"
#define EP_CLSID "{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}" #define EP_CLSID "{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}"
#define DOSMODE_OFFSET 78 #define DOSMODE_OFFSET 78
#ifndef _M_ARM64
#define SETUP_UTILITY_NAME "ep_setup.exe" #define SETUP_UTILITY_NAME "ep_setup.exe"
#define TOAST_BUFSIZ 1024 #else
#define SETUP_UTILITY_NAME "ep_setup_arm64.exe"
#endif
#define TOAST_BUFSIZ 1536
#define SEH_REGPATH "Control Panel\\Quick Actions\\Control Center\\QuickActionsStateCapture\\ExplorerPatcher" #define SEH_REGPATH "Control Panel\\Quick Actions\\Control Center\\QuickActionsStateCapture\\ExplorerPatcher"
#define EP_SETUP_HELPER_SWITCH "/CreateExplorerShellUnelevatedAfterServicing" #define EP_SETUP_HELPER_SWITCH "/CreateExplorerShellUnelevatedAfterServicing"
#define EP_DWM_SERVICENAME "ep_dwm_" EP_CLSID_LITE #define EP_DWM_SERVICENAME "ep_dwm_" EP_CLSID_LITE

6087
ExplorerPatcher/dllmain.c

File diff suppressed because it is too large Load Diff

10
ExplorerPatcher/fmemopen.h

@ -5,5 +5,15 @@
#include <fcntl.h> #include <fcntl.h>
#include <windows.h> #include <windows.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef __cplusplus
extern "C" {
#endif
FILE* fmemopen(void* buf, size_t len, const char* type); FILE* fmemopen(void* buf, size_t len, const char* type);
#ifdef __cplusplus
}
#endif
#endif #endif

8
ExplorerPatcher/getline.h

@ -5,8 +5,16 @@
#include <BaseTsd.h> #include <BaseTsd.h>
typedef SSIZE_T ssize_t; typedef SSIZE_T ssize_t;
#ifdef __cplusplus
extern "C" {
#endif
ssize_t getdelim(char** buf, size_t* bufsiz, int delimiter, FILE* fp); ssize_t getdelim(char** buf, size_t* bufsiz, int delimiter, FILE* fp);
ssize_t getline(char** buf, size_t* bufsiz, FILE* fp); ssize_t getline(char** buf, size_t* bufsiz, FILE* fp);
#ifdef __cplusplus
}
#endif
#endif #endif

73
ExplorerPatcher/hooking.h

@ -1,59 +1,66 @@
#ifndef _H_HOOKING_H_ #ifndef _H_HOOKING_H_
#define _H_HOOKING_H_ #define _H_HOOKING_H_
#define STRAT_REPLACE_ANY_TYPE_OF_JUMP_WITH_NOP 0
#define STRAT_REPLACE_ANY_TYPE_OF_JUMP_WITH_ALWAYS_JUMP 1 #ifdef __cplusplus
#define HOOK_WITH_FUNCHOOK 0 extern "C"
#define HOOK_WITH_DETOURS 1 {
#define HOW_TO_HOOK HOOK_WITH_FUNCHOOK
#if HOW_TO_HOOK == HOOK_WITH_FUNCHOOK
#ifdef _M_ARM64
#error Cannot compile for ARM64 using funchook. Change the source to hook with Detours and try again. Compilation aborted.
#endif #endif
#include <funchook.h>
#include <distorm.h> #include <KNSoft/SlimDetours/SlimDetours.h>
#pragma comment(lib, "funchook.lib")
#pragma comment(lib, "Psapi.lib") // required by funchook typedef struct funchook funchook_t;
#pragma comment(lib, "distorm.lib")
#elif HOW_TO_HOOK == HOOK_WITH_DETOURS inline funchook_t* funchook_create(void)
#include <detours.h>
#pragma comment(lib, "detours.lib")
void* funchook_create(void)
{ {
return 1; return (funchook_t*)1;
} }
int funchook_uninstall(
void* _this, inline int funchook_uninstall(
funchook_t* _this,
int flags int flags
) )
{ {
return 0; return 0;
} }
int funchook_destroy(void* _this)
inline int funchook_destroy(funchook_t* _this)
{ {
return 0; return 0;
} }
int funchook_prepare(
void* funchook, inline int funchook_prepare(
funchook_t* funchook,
void** target_func, void** target_func,
void* hook_func void* hook_func
) )
{ {
DetourTransactionBegin(); HRESULT hr = SlimDetoursInlineHook(TRUE, target_func, hook_func);
DetourUpdateThread(GetCurrentThread()); return SUCCEEDED(hr) ? 0 : hr;
DetourAttach(target_func, hook_func);
return DetourTransactionCommit();
} }
int funchook_install(
void* funchook, inline int funchook_install(
funchook_t* funchook,
int flags int flags
) )
{ {
return 0; return 0;
} }
#ifdef __cplusplus
} // extern "C"
#endif
#endif #endif
#if HOW_TO_HOOK == HOOK_WITH_FUNCHOOK
funchook_t* funchook = 0; #define HOOKING_SUCCESS 0
#elif HOW_TO_HOOK == HOOK_WITH_DETOURS
void* funchook = 0; #ifdef __cplusplus
extern "C"
{
#endif #endif
DECLSPEC_SELECTANY funchook_t* funchook = NULL;
#ifdef __cplusplus
} // extern "C"
#endif #endif

86
ExplorerPatcher/inc/ContainerPolicies.h

@ -0,0 +1,86 @@
#pragma once
#include <Windows.h>
#include <memsafe.h>
template<typename T>
class CTContainer_PolicyUnOwned
{
public:
static void Destroy(T* p) {}
};
template<typename T>
class CTContainer_PolicyRelease
{
public:
static void Destroy(T* p)
{
if (p)
p->Release();
}
};
class CTContainer_PolicyNewMem
{
public:
template<typename T>
static void Destroy(T* p)
{
delete p;
}
};
class CTContainer_PolicyCoTaskMem
{
public:
static void Destroy(void* p)
{
CoTaskMemFree(p);
}
};
class CTContainer_PolicyLocalMem
{
public:
static void Destroy(void* p)
{
DestroyMem(p);
}
static BOOL DestroyMem(void* p)
{
return !LocalFree(p);
}
};
template <typename T>
class CTPolicyCoTaskMem : CTContainer_PolicyCoTaskMem
{
public:
static void Destroy(void* p)
{
CTContainer_PolicyCoTaskMem::Destroy(p);
}
static HRESULT ReallocArray(T* pv, size_t cItems, T** ppv)
{
return CoReallocArray(pv, cItems, ppv);
}
};
template <typename T>
class CTPolicyLocalMem : CTContainer_PolicyLocalMem
{
public:
static void Destroy(void* p)
{
DestroyMem(p);
}
static HRESULT ReallocArray(T* pv, size_t cItems, T** ppv)
{
return LocalReallocArray(pv, cItems, ppv);
}
};

906
ExplorerPatcher/inc/NativeString.h

@ -0,0 +1,906 @@
#pragma once
#include <intsafe.h>
#include <strsafe.h>
#include "ResultUtils.h"
namespace Windows::Internal
{
class ResourceString
{
public:
static bool FindAndSize(HINSTANCE hInstance, UINT uId, WORD wLanguage, const WCHAR** ppch, WORD* plen)
{
bool fRet = false;
*ppch = nullptr;
if (plen)
*plen = 0;
HRSRC hRes = FindResourceExW(hInstance, RT_STRING, MAKEINTRESOURCEW((uId >> 4) + 1), wLanguage);
if (hRes)
{
HGLOBAL hStringSeg = LoadResource(hInstance, hRes);
if (hStringSeg)
{
WCHAR* pch = (WCHAR*)LockResource(hStringSeg);
if (pch)
{
for (uId = (char)uId & 0xF; uId; --uId)
pch += *pch + 1;
*ppch = *pch ? pch + 1 : L"";
if (plen)
*plen = *pch;
fRet = true;
}
}
}
return fRet;
}
};
template <typename ElementType>
class CoTaskMemPolicy
{
public:
static ElementType* Alloc(size_t bytes)
{
return (ElementType*)CoTaskMemAlloc(bytes);
}
static ElementType* Realloc(ElementType* p, size_t bytes)
{
return (ElementType*)CoTaskMemRealloc(p, bytes);
}
static void Free(ElementType* p)
{
CoTaskMemFree(p);
}
};
template <typename ElementType>
class LocalMemPolicy
{
public:
static ElementType* Alloc(size_t bytes)
{
return (ElementType*)LocalAlloc(LMEM_FIXED, bytes);
}
static ElementType* Realloc(ElementType* p, size_t bytes)
{
return (ElementType*)LocalReAlloc(p, bytes, LMEM_MOVEABLE);
}
static void Free(ElementType* p)
{
LocalFree(p);
}
};
template <typename Allocator>
class NativeString
{
public:
NativeString() : _pszStringData(nullptr), _cchStringData(0), _cchStringDataCapacity(0)
{
}
NativeString(NativeString&& other) noexcept
: _pszStringData(other._pszStringData)
, _cchStringData(other._cchStringData)
, _cchStringDataCapacity(other._cchStringDataCapacity)
{
other._pszStringData = nullptr;
other._cchStringData = 0;
other._cchStringDataCapacity = 0;
}
private:
NativeString(const NativeString&) = delete;
public:
~NativeString()
{
Free();
}
HRESULT Initialize(const WCHAR* psz, const size_t cch)
{
return _Initialize(psz, cch);
}
HRESULT Initialize(const WCHAR* psz)
{
return _Initialize(psz, s_cchUnknown);
}
HRESULT Initialize(const NativeString& other)
{
return _Initialize(other._pszStringData, other.GetCount());
}
HRESULT Initialize(HINSTANCE hInstance, UINT uId, WORD wLanguage)
{
HRESULT hr;
const WCHAR* rgch;
WORD cch;
if (ResourceString::FindAndSize(hInstance, uId, wLanguage, &rgch, &cch))
{
hr = _Initialize(rgch, cch);
}
else
{
hr = E_FAIL;
}
return hr;
}
HRESULT Initialize(HINSTANCE hInstance, UINT uId)
{
return Initialize(hInstance, uId, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL));
}
HRESULT Initialize(HKEY hKey, const WCHAR* pszValueName)
{
return _InitializeFromRegistry(hKey, pszValueName, true);
}
HRESULT Initialize(HKEY hKey, const WCHAR* pszSubKey, const WCHAR* pszValueName)
{
HKEY hkeySub;
HRESULT hr = HRESULT_FROM_WIN32(RegOpenKeyExW(hKey, pszSubKey, 0, KEY_READ, &hkeySub));
if (SUCCEEDED(hr))
{
hr = Initialize(hkeySub, pszValueName);
RegCloseKey(hkeySub);
}
return hr;
}
HRESULT InitializeNoExpand(HKEY hKey, const WCHAR* pszValueName)
{
return _InitializeFromRegistry(hKey, pszValueName, false);
}
HRESULT InitializeNoExpand(HKEY hKey, const WCHAR* pszSubKey, const WCHAR* pszValueName)
{
HKEY hkeySub;
HRESULT hr = HRESULT_FROM_WIN32(RegOpenKeyExW(hKey, pszSubKey, 0, KEY_READ, &hkeySub));
if (SUCCEEDED(hr))
{
hr = InitializeNoExpand(hkeySub, pszValueName);
RegCloseKey(hkeySub);
}
return hr;
}
HRESULT InitializeFormat(const WCHAR* pszFormat, va_list argList)
{
return _InitializeHelper(pszFormat, argList, [](const WCHAR* pszFormat, va_list argList, WCHAR* pszStringData, size_t cchStringData) -> HRESULT
{
_set_errno(0);
HRESULT hr = StringCchVPrintfW(pszStringData, cchStringData, pszFormat, argList);
if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
{
errno_t err;
_get_errno(&err);
if (err == EINVAL)
{
hr = E_INVALIDARG;
}
}
return hr;
});
}
HRESULT InitializeFormat(const WCHAR* pszFormat, ...)
{
va_list args;
va_start(args, pszFormat);
return InitializeFormat(pszFormat, args);
}
HRESULT InitializeResFormat(HINSTANCE hInstance, UINT uId, ...)
{
va_list argList;
va_start(argList, uId);
NativeString spszFormat;
HRESULT hr = spszFormat.Initialize(hInstance, uId);
if (SUCCEEDED(hr))
{
hr = InitializeFormat(spszFormat._pszStringData, argList);
}
return hr;
}
HRESULT InitializeResMessage(HINSTANCE hInstance, UINT uId, ...)
{
va_list argList;
va_start(argList, uId);
NativeString spszFormat;
HRESULT hr = spszFormat.Initialize(hInstance, uId);
if (SUCCEEDED(hr))
{
hr = _InitializeHelper(spszFormat._pszStringData, argList, [](const WCHAR* pszFormat, va_list argList, WCHAR* pszStringData, size_t cchStringData) -> HRESULT
{
va_list argListT = argList;
DWORD cchResult = FormatMessageW(FORMAT_MESSAGE_FROM_STRING, pszFormat, 0, 0, pszStringData, (DWORD)cchStringData, &argListT);
return ResultFromWin32Bool(cchResult);
});
}
return hr;
}
void Free()
{
_Free();
}
void Attach(WCHAR* psz)
{
_Attach(psz);
}
void Attach(WCHAR* psz, const size_t cch)
{
_Attach(psz, cch);
}
WCHAR* Detach()
{
return _Detach();
}
HRESULT DetachInitializeIfEmpty(WCHAR** ppsz)
{
*ppsz = nullptr;
HRESULT hr = S_OK;
if (_pszStringData)
{
hr = Initialize(L"");
}
if (SUCCEEDED(hr))
{
*ppsz = Detach();
}
return hr;
}
WCHAR** FreeAndGetAddressOf()
{
return _FreeAndGetAddressOf();
}
HRESULT CopyTo(WCHAR** ppszDest) const
{
HRESULT hr;
*ppszDest = nullptr;
if (_pszStringData)
{
NativeString spszT;
hr = spszT.Initialize(*this);
if (SUCCEEDED(hr))
{
*ppszDest = spszT.Detach();
}
}
else
{
hr = HRESULT_FROM_WIN32(ERROR_NOT_FOUND);
}
return hr;
}
HRESULT CopyTo(WCHAR* pszDest, size_t cchDest) const
{
if (!_pszStringData)
{
if (cchDest)
*pszDest = 0;
return HRESULT_FROM_WIN32(ERROR_NOT_FOUND);
}
return StringCchCopyW(pszDest, cchDest, _pszStringData);
}
const WCHAR* Get() const
{
return _Get();
}
const WCHAR* GetNonNull() const
{
return _pszStringData ? _pszStringData : L"";
}
size_t GetCount()
{
return _GetCount();
}
size_t GetCount() const
{
return _GetCount();
}
bool IsEmpty() const
{
return _IsEmpty();
}
bool HasLength() const
{
return !_IsEmpty();
}
int CompareOrdinal(const WCHAR* psz, const size_t cch) const
{
return CompareStringOrdinal(GetNonNull(), (int)GetCount(), psz ? psz : L"", psz ? (int)cch : 0, FALSE);
}
int CompareOrdinal(const WCHAR* psz) const
{
return CompareOrdinal(psz, s_cchUnknown);
}
int CompareOrdinal(const NativeString& other) const
{
return CompareOrdinal(other.GetNonNull(), other.GetCount());
}
int CompareOrdinalIgnoreCase(const WCHAR* psz, const size_t cch) const
{
return CompareStringOrdinal(GetNonNull(), (int)GetCount(), psz ? psz : L"", psz ? (int)cch : 0, TRUE);
}
int CompareOrdinalIgnoreCase(const WCHAR* psz) const
{
return CompareOrdinalIgnoreCase(psz, s_cchUnknown);
}
int CompareOrdinalIgnoreCase(const NativeString& other) const
{
return CompareOrdinalIgnoreCase(other.GetNonNull(), other.GetCount());
}
HRESULT Concat(const WCHAR* psz, const size_t cch)
{
return _Concat(psz, cch);
}
HRESULT Concat(WCHAR c)
{
return _Concat(c);
}
HRESULT Concat(const WCHAR* psz)
{
return _Concat(psz, psz ? wcslen(psz) : 0);
}
HRESULT Concat(const NativeString& other)
{
return _Concat(other.Get(), other.GetCount());
}
HRESULT Concat(HINSTANCE hInstance, UINT uId, WORD wLanguage)
{
HRESULT hr;
const WCHAR* rgch;
WORD cch;
if (ResourceString::FindAndSize(hInstance, uId, wLanguage, &rgch, &cch))
{
hr = _Concat(rgch, cch);
}
else
{
hr = HRESULT_FROM_WIN32(ERROR_NOT_FOUND);
}
return hr;
}
HRESULT Concat(HINSTANCE hInstance, UINT uId)
{
return Concat(hInstance, uId, MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL));
}
HRESULT ConcatFormat(const WCHAR* pszFormat, va_list argList)
{
if (IsEmpty())
{
return InitializeFormat(pszFormat, argList);
}
NativeString strT;
HRESULT hr = strT.InitializeFormat(pszFormat, argList);
if (SUCCEEDED(hr))
{
hr = Concat(strT);
}
return hr;
}
HRESULT ConcatFormat(const WCHAR* pszFormat, ...)
{
va_list argList;
va_start(argList, pszFormat);
return ConcatFormat(pszFormat, argList);
}
bool RemoveAt(size_t iElem, size_t cchElem)
{
return _RemoveAt(iElem, cchElem);
}
bool TrimStart(const WCHAR* pszTrim)
{
return _TrimStart(pszTrim);
}
bool TrimEnd(const WCHAR* pszTrim)
{
return _TrimEnd(pszTrim);
}
inline static const WCHAR* const s_pszTrimWhitespaceCharacterSet =
L"\u0020" // Space
L"\u0009" // Tab
L"\u3000" // Ideographic Space
L"\u17D2" // Khmer Sign Coeng
L"\u0F0B" // Tibetan Mark Intersyllabic Tsheg
L"\u1680" // Ogham Space Mark
L"\u180E" // Mongolian Vowel Separator
;
bool TrimWhitespace()
{
bool fWasCharacterTrimmedEnd = _TrimEnd(s_pszTrimWhitespaceCharacterSet);
bool fWasCharacterTrimmedStart = _TrimStart(s_pszTrimWhitespaceCharacterSet);
return fWasCharacterTrimmedStart || fWasCharacterTrimmedEnd;
}
void ReplaceChars(const WCHAR wcFind, const WCHAR wcReplace)
{
_EnsureCount();
for (size_t i = 0; i < _cchStringData; i++)
{
if (_pszStringData[i] == wcFind)
_pszStringData[i] = wcReplace;
}
}
NativeString& operator=(NativeString&& other) noexcept
{
_Free();
_pszStringData = other._pszStringData;
_cchStringData = other._cchStringData;
_cchStringDataCapacity = other._cchStringDataCapacity;
other._pszStringData = nullptr;
other._cchStringData = 0;
other._cchStringDataCapacity = 0;
return *this;
}
private:
NativeString& operator=(const NativeString& other) = delete;
public:
WCHAR** operator&()
{
return FreeAndGetAddressOf();
}
/*WCHAR* operator*() const
{
return Get();
}*/
bool operator==(const WCHAR* pszOther) const
{
return pszOther ? CompareOrdinal(pszOther) == CSTR_EQUAL : !_pszStringData;
}
bool operator!=(const WCHAR* pszOther) const
{
return !operator==(pszOther);
}
HRESULT AppendMayTruncate(const WCHAR* psz, size_t cchMaxCapacity)
{
return _ConcatMayTruncate(psz, cchMaxCapacity);
}
HRESULT EnsureCapacity(size_t cchDesired)
{
return _EnsureCapacity(cchDesired);
}
private:
void _EnsureCount()
{
if (_cchStringData == s_cchUnknown)
{
_cchStringData = _pszStringData ? wcslen(_pszStringData) : 0;
}
}
HRESULT _EnsureCapacity(size_t cchDesired)
{
size_t cchCapacityCur;
HRESULT hr = SizeTAdd(cchDesired, 1, &cchCapacityCur);
if (SUCCEEDED(hr))
{
if (_cchStringDataCapacity == s_cchUnknown)
{
_EnsureCount();
_cchStringDataCapacity = _pszStringData ? _cchStringData + 1 : 0;
}
if (_cchStringDataCapacity == 0) // First allocation
{
size_t cbDesired;
hr = SizeTMult(cchCapacityCur, sizeof(WCHAR), &cbDesired);
if (SUCCEEDED(hr))
{
WCHAR* pvArrayT = Allocator::Alloc(cbDesired);
hr = pvArrayT ? S_OK : E_OUTOFMEMORY;
if (SUCCEEDED(hr))
{
_cchStringDataCapacity = cchCapacityCur;
_pszStringData = pvArrayT;
pvArrayT[0] = 0;
}
}
}
else if (cchCapacityCur > _cchStringDataCapacity) // Growing
{
size_t celemNew;
hr = SizeTMult(_cchStringDataCapacity, 2, &celemNew); // Double the capacity
if (SUCCEEDED(hr))
{
if (celemNew - _cchStringDataCapacity > 2048)
celemNew = _cchStringDataCapacity + 2048; // Make sure it doesn't grow too much; TODO Check disassembly
if (cchCapacityCur <= celemNew)
cchCapacityCur = celemNew;
WCHAR* pvArrayT = Allocator::Realloc(_pszStringData, sizeof(WCHAR) * cchCapacityCur);
hr = pvArrayT ? S_OK : E_OUTOFMEMORY;
if (SUCCEEDED(hr))
{
_cchStringDataCapacity = cchCapacityCur;
_pszStringData = pvArrayT;
}
}
}
}
return hr;
}
bool _IsEmpty() const
{
return !_pszStringData || !_pszStringData[0];
}
HRESULT _Initialize(const WCHAR* psz, size_t cch)
{
size_t cchDesired = cch;
size_t cchStringData;
HRESULT hr = S_OK;
if (psz)
{
if (cchDesired == s_cchUnknown)
{
cchDesired = wcslen(psz);
cchStringData = cchDesired;
}
else
{
cchStringData = _NativeString_Min<size_t>(cchDesired, wcslen(psz)); // @MOD Prevent double evaluation
}
hr = _EnsureCapacity(cchDesired);
if (SUCCEEDED(hr))
{
StringCchCopyNW(_pszStringData, cchDesired + 1, psz, cchStringData);
_cchStringData = cchStringData;
}
}
else
{
_Free();
}
return hr;
}
template <typename T>
HRESULT _InitializeHelper(const WCHAR* pszFormat, va_list argList, const T& callback)
{
HRESULT hr;
size_t cchCapacityGuess = 32;
do
{
hr = _EnsureCapacity(cchCapacityGuess);
if (SUCCEEDED(hr))
{
hr = callback(pszFormat, argList, _pszStringData, _cchStringDataCapacity);
if (hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER))
{
size_t cchCapacityT;
hr = SizeTAdd(_cchStringDataCapacity, 32, &cchCapacityT);
if (SUCCEEDED(hr))
{
cchCapacityGuess = cchCapacityT;
}
}
else
{
break;
}
}
}
while (SUCCEEDED(hr));
if (SUCCEEDED(hr))
{
_cchStringData = s_cchUnknown;
}
else
{
_Free();
}
return hr;
}
HRESULT _InitializeFromRegistry(HKEY hKey, const WCHAR* pszValueName, bool fExpand)
{
DWORD dwType;
DWORD cbT = 0;
LSTATUS lRes = RegQueryValueExW(hKey, pszValueName, nullptr, &dwType, nullptr, &cbT);
HRESULT hr = HRESULT_FROM_WIN32(lRes);
if (SUCCEEDED(hr) && ((dwType != REG_SZ && dwType != REG_EXPAND_SZ) || cbT == 0 || (cbT & 1) != 0))
{
hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
}
WCHAR* pszT = nullptr;
if (SUCCEEDED(hr))
{
pszT = Allocator::Alloc(cbT);
hr = pszT ? S_OK : E_OUTOFMEMORY;
}
if (SUCCEEDED(hr))
{
lRes = RegQueryValueExW(hKey, pszValueName, nullptr, &dwType, (LPBYTE)pszT, &cbT);
hr = HRESULT_FROM_WIN32(lRes);
}
DWORD cchT = 0;
if (SUCCEEDED(hr))
{
cchT = (cbT / sizeof(WCHAR)) - 1;
if (dwType == REG_EXPAND_SZ && fExpand)
{
DWORD cchBuffer = ExpandEnvironmentStringsW(pszT, nullptr, 0);
if (cchBuffer != 0)
{
WCHAR* pszExpand = Allocator::Alloc(sizeof(WCHAR) * cchBuffer);
hr = pszExpand ? S_OK : E_OUTOFMEMORY;
if (SUCCEEDED(hr))
{
DWORD cchResult = ExpandEnvironmentStringsW(pszT, pszExpand, cchBuffer);
hr = ResultFromWin32Count(cchResult, cchBuffer);
if (SUCCEEDED(hr))
{
Allocator::Free(pszT);
pszT = pszExpand;
cchT = cchResult - 1;
}
else
{
Allocator::Free(pszExpand);
}
}
}
}
}
if (SUCCEEDED(hr))
{
if (!pszT[cchT])
{
_Attach(pszT, cchT + 1);
pszT = nullptr;
}
else
{
hr = HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
}
}
Allocator::Free(pszT);
return hr;
}
size_t _GetCount()
{
_EnsureCount();
return _cchStringData;
}
size_t _GetCount() const
{
if (_cchStringData != s_cchUnknown)
return _cchStringData;
return _pszStringData ? wcslen(_pszStringData) : 0;
}
const WCHAR* _Get() const
{
return _pszStringData;
}
HRESULT _Concat(const WCHAR c)
{
WCHAR sz[2] = { c, 0 };
return _Concat(sz, 1);
}
HRESULT _Concat(const WCHAR* psz, const size_t cch)
{
HRESULT hr = S_OK;
if (psz)
{
_EnsureCount();
hr = _EnsureCapacity(cch + _cchStringData);
if (SUCCEEDED(hr))
{
StringCchCopyNW(&_pszStringData[_cchStringData], cch + 1, psz, cch);
_cchStringData += cch;
}
}
return hr;
}
HRESULT _ConcatMayTruncate(const WCHAR* psz, size_t cchMaxCapacity)
{
_EnsureCount();
HRESULT hr = S_OK;
if (cchMaxCapacity > _cchStringData)
{
size_t cchDesired = _NativeString_Min<size_t>(cchMaxCapacity - _cchStringData, wcslen(psz)); // @MOD Prevent double evaluation
hr = _Concat(psz, cchDesired);
}
else if (cchMaxCapacity < _cchStringData)
{
_cchStringData = cchMaxCapacity;
_pszStringData[cchMaxCapacity] = 0;
}
return hr;
}
bool _RemoveAt(size_t iElem, size_t cchElem)
{
_EnsureCount();
bool fRet = false;
if (iElem < _cchStringData)
{
cchElem = _NativeString_Min<size_t>(cchElem, _cchStringData - iElem); // @MOD Prevent double evaluation
if (cchElem)
{
memmove(&_pszStringData[iElem], &_pszStringData[iElem + cchElem], sizeof(WCHAR) * (_cchStringData - iElem - cchElem));
_cchStringData -= cchElem;
}
_pszStringData[_cchStringData] = 0;
fRet = true;
}
return fRet;
}
bool _TrimStart(const WCHAR* pszTrim)
{
_EnsureCount();
bool fNeedsTrimming = false;
size_t cch;
for (cch = 0; cch < _cchStringData; ++cch)
{
if (!wcschr(pszTrim, _pszStringData[cch]))
break;
}
if (cch)
{
fNeedsTrimming = true;
memmove(_pszStringData, &_pszStringData[cch], sizeof(WCHAR) * (_cchStringData - cch) + sizeof(WCHAR));
_cchStringData -= cch;
}
return fNeedsTrimming;
}
bool _TrimEnd(const WCHAR* pszTrim)
{
_EnsureCount();
size_t cch;
for (cch = _cchStringData; cch; --cch)
{
if (!wcschr(pszTrim, _pszStringData[cch - 1]))
break;
}
bool fNeedsTrimming = false;
if (cch != _cchStringData)
{
fNeedsTrimming = true;
_pszStringData[cch] = 0;
_cchStringData = cch;
}
return fNeedsTrimming;
}
void _Free()
{
if (_pszStringData)
{
Allocator::Free(_pszStringData);
_pszStringData = nullptr;
}
_cchStringData = 0;
_cchStringDataCapacity = 0;
}
void _Attach(WCHAR* psz)
{
return _Attach(psz, wcslen(psz) + 1);
}
void _Attach(WCHAR* psz, const size_t cch)
{
_Free();
if (psz && cch)
{
_pszStringData = psz;
_cchStringData = cch - 1;
_cchStringDataCapacity = cch;
psz[cch - 1] = 0;
}
}
WCHAR* _Detach()
{
WCHAR* pszStringData = _pszStringData;
_pszStringData = nullptr;
_cchStringData = 0;
_cchStringDataCapacity = 0;
return pszStringData;
}
WCHAR** _FreeAndGetAddressOf()
{
_Free();
_cchStringData = s_cchUnknown;
_cchStringDataCapacity = s_cchUnknown;
return &_pszStringData;
}
static const size_t s_cchUnknown = -1;
WCHAR* _pszStringData;
size_t _cchStringData;
size_t _cchStringDataCapacity;
template <typename T>
static FORCEINLINE constexpr const T& (_NativeString_Min)(const T& a, const T& b)
{
return a < b ? a : b;
}
};
}
typedef Windows::Internal::NativeString<Windows::Internal::CoTaskMemPolicy<WCHAR>> CoTaskMemNativeString;

46
ExplorerPatcher/inc/RefCountedObject.h

@ -0,0 +1,46 @@
#pragma once
#include <wrl/client.h>
template <typename T>
class CRefCountedObject : public IUnknown, public T
{
public:
template <typename ...TArgs>
CRefCountedObject(TArgs&& ...args)
: T(std::forward<TArgs>(args)...)
, _cRef(0)
{
}
virtual ~CRefCountedObject()
{
}
STDMETHODIMP QueryInterface(REFIID riid, void** ppvObject) override
{
*ppvObject = nullptr;
return E_NOTIMPL;
}
STDMETHODIMP_(ULONG) AddRef() override
{
return InterlockedIncrement(&_cRef);
}
STDMETHODIMP_(ULONG) Release() override
{
ULONG refCount = InterlockedDecrement(&_cRef);
if (refCount == 0)
delete this;
return refCount;
}
ULONG _cRef;
};
template <typename T, typename ...TArgs>
Microsoft::WRL::ComPtr<CRefCountedObject<T>> CreateRefCountedObj(TArgs&& ...args)
{
return new(std::nothrow) CRefCountedObject<T>(std::forward<TArgs>(args)...);
}

29
ExplorerPatcher/inc/ResultUtils.h

@ -0,0 +1,29 @@
#pragma once
#include <Windows.h>
inline HRESULT ResultFromWin32(__in DWORD dwErr)
{
return HRESULT_FROM_WIN32(dwErr);
}
inline HRESULT ResultFromLastError()
{
return ResultFromWin32(GetLastError());
}
inline HRESULT ResultFromKnownLastError()
{
HRESULT hr = ResultFromLastError();
return (SUCCEEDED(hr) ? E_FAIL : hr);
}
inline HRESULT ResultFromWin32Bool(BOOL b)
{
return b ? S_OK : ResultFromKnownLastError();
}
inline HRESULT ResultFromWin32Count(UINT cchResult, UINT cchBuffer)
{
return cchResult && cchResult <= cchBuffer ? S_OK : ResultFromWin32(ERROR_INSUFFICIENT_BUFFER);
}

583
ExplorerPatcher/inc/SimpleArray.h

@ -0,0 +1,583 @@
#pragma once
#include <Windows.h>
#include <type_traits>
#include "ContainerPolicies.h"
template <typename T>
class CSimpleArrayStandardCompareHelper
{
public:
int Compare(const T& t1, const T& t2) const
{
return t2 == t1 ? 0 : t2 < t1 ? 1 : -1;
}
};
class CSimpleArrayCaseInsensitiveOrdinalStringCompareHelper
{
public:
int Compare(const WCHAR* psz1, const WCHAR* psz2) const
{
return CompareStringOrdinal(psz1, -1, psz2, -1, TRUE) - CSTR_EQUAL;
}
};
template <typename T>
class CSimpleArrayStandardMergeHelper
{
};
template <
typename T,
typename CompareHelper
>
class CTSimpleFixedArray
{
public:
T* _parray;
size_t _celem;
CTSimpleFixedArray()
: _parray(nullptr)
, _celem(0)
{
}
size_t GetSize() const { return _celem; }
T& operator[](size_t iElem) { return _parray[iElem]; }
const T& operator[](size_t iElem) const { return _parray[iElem]; }
HRESULT GetAt(size_t iElem, T& tOut) const
{
HRESULT hr = TYPE_E_OUTOFBOUNDS;
if (iElem < _celem)
{
tOut = _parray[iElem];
hr = S_OK;
}
return hr;
}
T* GetData() const { return _parray; }
T* begin() { return _parray; }
T* begin() const { return _parray; }
T* end() { return _parray + _celem; }
T* end() const { return _parray + _celem; }
HRESULT Find(const T& t, size_t* piElem, size_t iStartAt = 0) const
{
return FindEx(CompareHelper(), t, piElem, iStartAt);
}
template <typename Comparer>
HRESULT FindEx(const Comparer& tcompare, const T& t, size_t* piElem, size_t iStartAt = 0) const
{
*piElem = 0;
for (size_t i = iStartAt; i < _celem; ++i)
{
if (tcompare.Compare(_parray[i], t) == 0)
{
*piElem = i;
return S_OK;
}
}
return TYPE_E_ELEMENTNOTFOUND;
}
HRESULT BinarySearch(const T& t, size_t* piElem) const
{
return BinarySearchEx(CompareHelper(), t, piElem);
}
template <typename Comparer>
HRESULT BinarySearchEx(const Comparer& tcompare, const T& t, size_t* piElem) const
{
*piElem = 0;
HRESULT hr = TYPE_E_ELEMENTNOTFOUND;
if (_celem != 0)
{
hr = S_OK;
size_t iLow = 0;
size_t iHigh = _celem - 1;
while (true)
{
size_t iMid = (iLow + iHigh) / 2;
int compare = tcompare.Compare(_parray[iMid], t);
if (compare > 0)
{
if (iMid != 0)
{
iHigh = iMid - 1;
}
else
{
hr = TYPE_E_ELEMENTNOTFOUND;
}
}
else if (compare < 0)
{
iLow = iMid + 1;
}
else
{
for (; iMid != 0; --iMid)
{
if (tcompare.Compare(_parray[iMid - 1], t) != 0)
break;
}
*piElem = iMid;
break;
}
if (iHigh < iLow)
hr = TYPE_E_ELEMENTNOTFOUND;
if (FAILED(hr))
{
*piElem = compare < 0 ? iLow : iMid;
break;
}
}
}
return hr;
}
template <typename TCallback>
void ForEach(const TCallback& callback) const // @MOD Pass callback by reference
{
for (size_t iElement = 0; iElement < _celem; ++iElement)
{
callback(iElement, _parray[iElement]);
}
}
};
template <
typename T,
size_t MaxSize,
typename Allocator,
typename CompareHelper,
typename MergeHelper = CSimpleArrayStandardMergeHelper<T>
>
class CTSimpleArray : public CTSimpleFixedArray<T, CompareHelper>
{
public:
T* _parrayT;
size_t _celemCapacity;
CTSimpleArray()
: CTSimpleFixedArray<T, CompareHelper>()
, _parrayT(nullptr)
, _celemCapacity(0)
{
}
~CTSimpleArray()
{
RemoveAll();
}
HRESULT Add(const T& t, size_t* piElemInsertedAt = nullptr)
{
return _Add(t, piElemInsertedAt);
}
HRESULT Add(T&& t, size_t* piElemInsertedAt = nullptr)
{
return _Add(std::move(t), piElemInsertedAt);
}
HRESULT InsertAt(const T& t, size_t iElem)
{
return _InsertAt(t, iElem);
}
HRESULT InsertAt(T&& t, size_t iElem)
{
return _InsertAt(std::move(t), iElem);
}
HRESULT SetAtIndex(size_t iElem, const T& t)
{
return _SetAtIndex(iElem, t);
}
HRESULT SetAtIndex(size_t iElem, T&& t)
{
return _SetAtIndex(iElem, std::move(t));
}
HRESULT Remove(const T& t, size_t* piElemRemovedAt = nullptr)
{
if (piElemRemovedAt)
*piElemRemovedAt = 0;
size_t iElem;
HRESULT hr = this->Find(t, &iElem);
if (SUCCEEDED(hr))
{
hr = RemoveAt(iElem);
if (SUCCEEDED(hr) && piElemRemovedAt)
{
*piElemRemovedAt = iElem;
}
}
return hr;
}
HRESULT RemoveAt(size_t iElem)
{
if (iElem >= this->_celem)
return TYPE_E_OUTOFBOUNDS;
if constexpr (!std::is_trivially_destructible_v<T>)
this->_parray[iElem].~T();
if (iElem != this->_celem - 1)
memmove(std::addressof(this->_parray[iElem]), std::addressof(this->_parray[iElem + 1]), sizeof(T) * (this->_celem - iElem - 1));
--this->_celem;
return S_OK;
}
void RemoveAll()
{
if (this->_parray)
{
if constexpr (!std::is_trivially_destructible_v<T>)
{
for (size_t i = 0; i < this->_celem; ++i)
this->_parray[i].~T();
}
Allocator::Destroy(this->_parray);
this->_parray = nullptr;
}
this->_celem = 0;
_celemCapacity = 0;
}
void TransferData(CTSimpleArray* other)
{
RemoveAll();
this->_parray = other->_parray;
this->_celem = other->_celem;
this->_parrayT = other->_parrayT;
this->_celemCapacity = other->_celemCapacity;
other->_parray = nullptr;
other->_celem = 0;
other->_parrayT = nullptr;
other->_celemCapacity = 0;
}
size_t GetCapacity() const
{
return _celemCapacity;
}
HRESULT Sort()
{
return SortEx(CompareHelper());
}
template <typename Comparer>
HRESULT SortEx(const Comparer& tcompare)
{
HRESULT hr = S_OK;
if (this->_celem > 1)
{
_parrayT = nullptr;
hr = Allocator::ReallocArray(nullptr, this->_celem / 2, &_parrayT);
if (SUCCEEDED(hr))
{
_MergeSort(tcompare, 0, this->_celem);
Allocator::Destroy(_parrayT);
_parrayT = nullptr;
}
}
return hr;
}
HRESULT _EnsureCapacity(size_t celemCapacityDesired, size_t celemMaxCapacity = 4096)
{
HRESULT hr = HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
if (celemCapacityDesired > MaxSize)
return hr;
// If we have enough capacity, we're done
hr = S_OK;
size_t celemCapacityCur = _celemCapacity;
if (celemCapacityDesired <= celemCapacityCur)
return hr;
// Double the capacity
size_t celemCapacityT;
hr = SizeTMult(celemCapacityCur, 2, &celemCapacityT);
if (FAILED(hr))
return hr;
// Make sure we don't grow too much
celemCapacityT = celemCapacityT - celemCapacityCur > celemMaxCapacity ? celemCapacityCur + celemMaxCapacity : celemCapacityT;
// Cap at desired capacity and max capacity
celemCapacityT = celemCapacityDesired > celemCapacityT || celemCapacityT <= MaxSize ? max(celemCapacityDesired, celemCapacityT) : MaxSize;
// Realloc
T* pvArrayT;
hr = Allocator::ReallocArray(this->_parray, celemCapacityT, &pvArrayT);
if (FAILED(hr))
return hr;
_celemCapacity = celemCapacityT;
this->_parray = pvArrayT;
return hr;
}
HRESULT _MakeRoomAt(size_t iElem)
{
HRESULT hr = S_OK;
size_t cElemGrowTo = max(this->_celem, iElem) + 1;
if (cElemGrowTo > _celemCapacity)
{
hr = _EnsureCapacity(cElemGrowTo);
}
if (SUCCEEDED(hr))
{
if (iElem < this->_celem)
memmove(std::addressof(this->_parray[iElem + 1]), std::addressof(this->_parray[iElem]), sizeof(T) * (this->_celem - iElem));
this->_celem = cElemGrowTo;
}
return hr;
}
template <typename ArgType>
void _InternalSetAtIndex(size_t iElem, ArgType&& t)
{
T* newPos = std::addressof(this->_parray[iElem]);
if (newPos)
new(newPos) T(std::forward<ArgType>(t));
}
template <typename ArgType>
HRESULT _Add(ArgType&& t, size_t* piElemInsertedAt)
{
if (piElemInsertedAt)
*piElemInsertedAt = 0;
HRESULT hr = S_OK;
if (this->_celem == _celemCapacity)
{
hr = _EnsureCapacity(_celemCapacity + 1);
}
if (SUCCEEDED(hr))
{
_InternalSetAtIndex(this->_celem++, std::forward<ArgType>(t));
if (piElemInsertedAt)
*piElemInsertedAt = this->_celem - 1;
}
return hr;
}
template <typename ArgType>
HRESULT _InsertAt(ArgType&& t, size_t iElem)
{
HRESULT hr = _MakeRoomAt(iElem);
if (SUCCEEDED(hr))
{
_InternalSetAtIndex(iElem, std::forward<ArgType>(t));
}
return hr;
}
template <typename ArgType>
HRESULT _SetAtIndex(size_t iElem, ArgType&& t)
{
HRESULT hr = TYPE_E_OUTOFBOUNDS;
if (iElem < this->_celem)
{
_InternalSetAtIndex(iElem, std::forward<ArgType>(t));
hr = S_OK;
}
return hr;
}
template <typename Comparer>
void _MergeThem(const Comparer& tcompare, size_t iFirst, size_t cElems)
{
size_t cHalf = cElems / 2;
T* parraySrc = &this->_parray[iFirst];
memcpy(_parrayT, parraySrc, sizeof(T) * cHalf);
size_t iIn1 = 0;
size_t iIn2 = cHalf;
size_t iOut = 0;
bool fDone = false;
while (!fDone)
{
if (tcompare.Compare(_parrayT[iIn1], parraySrc[iIn2]) > 0)
{
memmove(&parraySrc[iOut], &parraySrc[iIn2], sizeof(T));
++iOut;
if (++iIn2 == cElems)
{
memcpy(&parraySrc[iOut], &_parrayT[iIn1], sizeof(T) * (cElems - iOut));
fDone = true;
}
}
else
{
memmove(&parraySrc[iOut], &_parrayT[iIn1], sizeof(T));
++iOut;
if (++iIn1 == cHalf)
{
fDone = true;
}
}
}
}
template <typename Comparer>
void _MergeSort(const Comparer& tcompare, size_t iFirst, size_t cElems)
{
if (cElems == 1)
return;
if (cElems == 2)
{
if (tcompare.Compare(this->_parray[iFirst], this->_parray[iFirst + 1]) > 0)
{
memmove(_parrayT, &this->_parray[iFirst], sizeof(T));
memmove(&this->_parray[iFirst], &this->_parray[iFirst + 1], sizeof(T));
memmove(&this->_parray[iFirst + 1], _parrayT, sizeof(T));
}
}
else
{
size_t cHalf = cElems >> 1;
_MergeSort(tcompare, iFirst, cHalf);
_MergeSort(tcompare, iFirst + cHalf, cElems - cHalf);
_MergeThem(tcompare, iFirst, cElems);
}
}
};
template <
typename T,
size_t MaxSize = UINT_MAX - 1,
typename CompareHelper = CSimpleArrayStandardCompareHelper<T>
>
class CCoSimpleArray : public CTSimpleArray<T, MaxSize, CTPolicyCoTaskMem<T>, CompareHelper>
{
public:
CCoSimpleArray()
{
}
CCoSimpleArray(CCoSimpleArray&& other) noexcept
{
this->TransferData(&other);
}
CCoSimpleArray& operator=(CCoSimpleArray&& other) noexcept
{
if (this != &other)
{
this->TransferData(&other);
}
return *this;
}
};
template <
typename T,
size_t MaxSize = UINT_MAX - 1,
typename CompareHelper = CSimpleArrayStandardCompareHelper<T>
>
class CLocalSimpleArray : public CTSimpleArray<T, MaxSize, CTPolicyLocalMem<T>, CompareHelper>
{
};
template <
typename T,
typename ElementAllocator,
typename CompareHelper = CSimpleArrayStandardCompareHelper<T>
>
class CSimplePointerArray : public CCoSimpleArray<T*, UINT_MAX - 1, CompareHelper>
{
public:
~CSimplePointerArray()
{
RemoveAndReleaseAll();
}
HRESULT RemoveAndReleaseAt(size_t iElem)
{
T* pT;
HRESULT hr = this->GetAt(iElem, pT);
if (SUCCEEDED(hr))
{
hr = this->RemoveAt(iElem);
if (SUCCEEDED(hr))
{
ElementAllocator::Destroy(pT);
}
}
return hr;
}
void RemoveAndReleaseAll()
{
for (size_t i = 0; i < this->_celem; ++i)
{
ElementAllocator::Destroy(this->_parray[i]);
}
this->RemoveAll();
}
};
template <
typename T,
typename CompareHelper = CSimpleArrayStandardCompareHelper<T*>
>
class CSimplePointerArrayNewMem : public CSimplePointerArray<T, CTContainer_PolicyNewMem, CompareHelper>
{
};
template <
typename T,
typename CompareHelper = CSimpleArrayStandardCompareHelper<T*>
>
class CSimplePointerArrayCoTaskMem : public CSimplePointerArray<T, CTPolicyCoTaskMem<T>, CompareHelper>
{
};
template <
typename T,
typename CompareHelper = CSimpleArrayStandardCompareHelper<T*>
>
class CSimplePointerArrayLocalMem : public CSimplePointerArray<T, CTPolicyLocalMem<T>, CompareHelper>
{
};
template <typename T>
class CSimplePointerArrayRelease : public CSimplePointerArray<T, CTContainer_PolicyRelease<T>>
{
};

720
ExplorerPatcher/inc/memsafe.h

@ -0,0 +1,720 @@
// Downloaded from:
// https://github.com/namealt/winsdk10/blob/d1acc505c51b11a6ceafb0f93c9dc584b8b4a9d3/Include/10.0.16299.0/um/memsafe.h
//
// Copyright (C) Microsoft. All rights reserved.
//
#if (_MSC_VER > 1000)
#pragma once
#endif
#ifndef __memsafe_h__
#define __memsafe_h__
#ifdef __cplusplus
//
// Various heap allocation helpers, featuring
// - Fully annotated
// - HRESULT return values
// - Integer overflow checks via intsafe.h
// - Type safety via templates (no typecasting required)
// - Zero initialization
//
// CoAllocBytes
// CoReallocBytes
// CoAllocObject
// CoAllocArray
// CoReallocArray
//
// CoAllocString
// CoAllocStringLen
// CoAllocStringDoubleNullTerminate
// CoAllocStringOpt
//
// LocalAllocBytes
// LocalReallocBytes
// LocalAllocObject
// LocalAllocArray
// LocalReallocArray
//
// LocalAllocString
// LocalAllocStringLen
// LocalAllocStringDoubleNullTerminate
// LocalAllocStringOpt
//
// HeapAllocBytes
// HeapReallocBytes
// HeapAllocObject
// HeapAllocArray
// HeapReallocArray
//
// HeapAllocString
// HeapAllocStringLen
// HeapAllocStringDoubleNullTerminate
// HeapAllocStringOpt
//
// GlobalAllocBytes
// GlobalReallocBytes
// GlobalAllocObject
// GlobalAllocArray
// GlobalReallocArray
//
// GlobalAllocString
// GlobalAllocStringLen
// GlobalAllocStringDoubleNullTerminate
// GlobalAllocStringOpt
//
#include <intsafe.h>
#include <strsafe.h>
// Flag for inhibiting zero-initialization
#define NO_ZERO_INIT 0x00000000
// Templates for isolating T* <--> void* conversions and integer arithmetic
template <class T, class TAllocPolicy>
inline HRESULT _AllocBytes(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return TAllocPolicy::Alloc(hHeap, dwFlags, cb, (void**)ppv);
}
template <class T, class TAllocPolicy>
inline HRESULT _ReallocBytes(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_opt_ T *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return TAllocPolicy::Realloc(hHeap, dwFlags, pv, cb, (void**)ppv);
}
template <class T, class TAllocPolicy>
inline HRESULT _AllocArray(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
*ppv = NULL;
size_t cb;
HRESULT hr = SizeTMult(cItems, sizeof(T), &cb);
if (SUCCEEDED(hr))
{
hr = TAllocPolicy::Alloc(hHeap, dwFlags, cb, (void**)ppv);
}
return hr;
}
template <class T, class TAllocPolicy>
inline HRESULT _ReallocArray(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_opt_ T *pv, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
*ppv = NULL;
size_t cb;
HRESULT hr = SizeTMult(cItems, sizeof(T), &cb);
if (SUCCEEDED(hr))
{
hr = TAllocPolicy::Realloc(hHeap, dwFlags, pv, cb, (void**)ppv);
}
return hr;
}
// Templates for isolating string-specific functionality
template <class TAllocPolicy>
inline HRESULT _AllocStringWorker(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_reads_opt_(cch) PCNZWCH pszSource, _In_ size_t cch, _In_ size_t cchExtra, _Outptr_result_buffer_(cch+cchExtra) _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
*ppsz = NULL;
size_t cchTotal;
HRESULT hr = SizeTAdd(cch, cchExtra, &cchTotal);
if (SUCCEEDED(hr))
{
// Note that we do not require dwFlags to include the allocator-specific
// zero-initialization flag here.
hr = _AllocArray<WCHAR,TAllocPolicy>(hHeap, dwFlags, cchTotal, ppsz);
if (SUCCEEDED(hr))
{
// The source string may be shorter than cch, so zero-initialize
// the entire buffer using STRSAFE_FILL_BEHIND_NULL.
//
// Note that _AllocStringDoubleNullTerminate relies on
// zero-initialization to provide the 2nd NULL terminator.
StringCchCopyNExW(*ppsz, cchTotal, pszSource, cch, NULL, NULL, STRSAFE_IGNORE_NULLS | STRSAFE_FILL_BEHIND_NULL);
}
}
return hr;
}
template <class TAllocPolicy>
inline HRESULT _AllocString(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PWSTR *ppsz)
{
// pszSource must be valid (non-NULL)
return _AllocStringWorker<TAllocPolicy>(hHeap, dwFlags, pszSource, wcslen(pszSource), 1, ppsz);
}
template <class TAllocPolicy>
inline HRESULT _AllocStringLen(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_reads_or_z_opt_(cch) PCNZWCH pszSource, _In_ size_t cch, _Outptr_result_buffer_(cch+1) _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
// pszSource is optional (may be NULL)
return _AllocStringWorker<TAllocPolicy>(hHeap, dwFlags, pszSource, cch, 1, ppsz);
}
// Takes a single-null terminated string and allocates a double-null terminated string.
template <class TAllocPolicy>
inline HRESULT _AllocStringDoubleNullTerminate(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PZZWSTR *ppsz)
{
// pszSource must be valid (non-NULL)
return _AllocStringWorker<TAllocPolicy>(hHeap, dwFlags, pszSource, wcslen(pszSource), 2, ppsz);
}
template <class TAllocPolicy>
inline HRESULT _AllocStringOpt(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_opt_ PCWSTR pszSource, _Outptr_result_maybenull_ _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
// pszSource is optional (may be NULL)
if (pszSource != NULL)
{
return _AllocString<TAllocPolicy>(hHeap, dwFlags, pszSource, ppsz);
}
*ppsz = NULL;
return S_OK;
}
#ifndef NO_COALLOC_HELPERS
#include <objbase.h>
// CoTaskMemAlloc does not zero-initialize by default. Define a flag to enable
// zero-init behavior.
#define CO_MEM_ZERO_INIT 0x00000001
class CTCoAllocPolicy
{
private:
#if (NTDDI_VERSION < NTDDI_WIN10_RS1) || defined(COM_SUPPORT_MALLOC_SPIES)
static size_t _CoTaskMemSize(_In_ _Post_writable_byte_size_(return) void *pv)
{
size_t cb = 0;
IMalloc *pMalloc;
if (SUCCEEDED(CoGetMalloc(1, &pMalloc))) // should never fail (static v-table)
{
// Returns (size_t)-1 if pv is NULL.
// Result is indeterminate if pv does not belong to CoTaskMemAlloc.
cb = pMalloc->GetSize(pv);
pMalloc->Release();
}
return cb;
}
#endif
public:
static HRESULT Alloc(_In_opt_ HANDLE /*hHeap*/, _In_ DWORD dwFlags, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) void **ppv)
{
*ppv = CoTaskMemAlloc(cb);
if (*ppv)
{
if (dwFlags & CO_MEM_ZERO_INIT)
{
#ifdef COM_SUPPORT_MALLOC_SPIES
// Zero-initialize the buffer
// The actual size might be larger than cb due to spies present.
// Initialize to the actual size in case of realloc later,
// or there might be an uninitialized gap in between.
size_t cbActual = _CoTaskMemSize(*ppv);
ZeroMemory(*ppv, cbActual);
#else
ZeroMemory(*ppv, cb);
#endif
}
return S_OK;
}
return E_OUTOFMEMORY;
}
static HRESULT Realloc(_In_opt_ HANDLE /*hHeap*/, _In_ DWORD dwFlags, _In_opt_ void *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) void **ppv)
{
#if (NTDDI_VERSION < NTDDI_WIN10_RS1)
size_t cbKeepIntact = 0;
if (pv && (dwFlags & CO_MEM_ZERO_INIT))
{
// Get the current size, so we know how much to zero-initialize
cbKeepIntact = _CoTaskMemSize(pv);
if (cb < cbKeepIntact)
{
// Shrinking the buffer, only keep the new size
cbKeepIntact = cb;
}
}
#else
// As of Redstone CoTaskMemRealloc always zero-initializes
// the tail of the allocation.
size_t cbKeepIntact = cb;
#endif
// If pv is NULL, CoTaskMemRealloc allocates a new block
*ppv = CoTaskMemRealloc(pv, cb);
if (*ppv)
{
if (dwFlags & CO_MEM_ZERO_INIT)
{
// Zero-initialize the trailing part of the buffer
#ifdef COM_SUPPORT_MALLOC_SPIES
// The actual size might be larger than cb due to due to spies present.
size_t cbActual = _CoTaskMemSize(*ppv);
#else
size_t cbActual = cb;
#endif
if (cbActual > cbKeepIntact)
{
ZeroMemory(((BYTE*)*ppv) + cbKeepIntact, cbActual - cbKeepIntact);
}
}
return S_OK;
}
return E_OUTOFMEMORY;
}
};
// CoTaskMemAlloc helpers
template <class T>
inline HRESULT CoAllocBytes(_In_ DWORD dwFlags, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocBytes<T, CTCoAllocPolicy>(NULL, dwFlags, cb, ppv);
}
template <class T>
inline HRESULT CoReallocBytes(_In_ DWORD dwFlags, _In_opt_ T *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _ReallocBytes<T, CTCoAllocPolicy>(NULL, dwFlags, pv, cb, ppv);
}
template <class T>
inline HRESULT CoAllocObject(_In_ DWORD dwFlags, _Outptr_result_buffer_(1) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocBytes<T, CTCoAllocPolicy>(NULL, dwFlags, sizeof(T), ppv);
}
template <class T>
inline HRESULT CoAllocArray(_In_ DWORD dwFlags, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocArray<T, CTCoAllocPolicy>(NULL, dwFlags, cItems, ppv);
}
template <class T>
inline HRESULT CoReallocArray(_In_ DWORD dwFlags, _In_opt_ T *pv, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _ReallocArray<T, CTCoAllocPolicy>(NULL, dwFlags, pv, cItems, ppv);
}
// Zero-initializing CoTaskMemAlloc helpers
template <class T>
inline HRESULT CoAllocBytes(_In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return CoAllocBytes(CO_MEM_ZERO_INIT, cb, ppv);
}
template <class T>
inline HRESULT CoReallocBytes(_In_opt_ T *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return CoReallocBytes(CO_MEM_ZERO_INIT, pv, cb, ppv);
}
template <class T>
inline HRESULT CoAllocObject(_Outptr_result_buffer_(1) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return CoAllocObject(CO_MEM_ZERO_INIT, ppv);
}
template <class T>
inline HRESULT CoAllocArray(_In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return CoAllocArray(CO_MEM_ZERO_INIT, cItems, ppv);
}
template <class T>
inline HRESULT CoReallocArray(_In_opt_ T *pv, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return CoReallocArray(CO_MEM_ZERO_INIT, pv, cItems, ppv);
}
// CoTaskMemAlloc string helpers
inline HRESULT CoAllocString(_In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PWSTR *ppsz)
{
return _AllocString<CTCoAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, ppsz);
}
inline HRESULT CoAllocStringLen( _In_reads_or_z_opt_(cch) PCNZWCH pszSource, _In_ size_t cch, _Outptr_result_buffer_(cch+1) _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
return _AllocStringLen<CTCoAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, cch, ppsz);
}
inline HRESULT CoAllocStringDoubleNullTerminate(_In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PZZWSTR *ppsz)
{
return _AllocStringDoubleNullTerminate<CTCoAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, ppsz);
}
inline HRESULT CoAllocStringOpt(_In_opt_ PCWSTR pszSource, _Outptr_result_maybenull_ _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
return _AllocStringOpt<CTCoAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, ppsz);
}
#endif // NO_COALLOC_HELPERS
#ifndef NO_LOCALALLOC_HELPERS
class CTLocalAllocPolicy
{
public:
static HRESULT Alloc(_In_opt_ HANDLE /*hHeap*/, _In_ DWORD dwFlags, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) void **ppv)
{
// ignore flags other than zero-init, assume fixed
*ppv = LocalAlloc(LMEM_FIXED | (dwFlags & LMEM_ZEROINIT), cb);
return (*ppv) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT Realloc(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_opt_ void *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) void **ppv)
{
if (pv == NULL)
{
return Alloc(hHeap, dwFlags, cb, ppv);
}
// LMEM_MOVEABLE is correct when reallocating LMEM_FIXED buffers
*ppv = LocalReAlloc(pv, cb, LMEM_MOVEABLE | (dwFlags & LMEM_ZEROINIT));
return (*ppv) ? S_OK : E_OUTOFMEMORY;
}
};
// LocalAlloc helpers
template <class T>
inline HRESULT LocalAllocBytes(_In_ DWORD dwFlags, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocBytes<T, CTLocalAllocPolicy>(NULL, dwFlags, cb, ppv);
}
template <class T>
inline HRESULT LocalReallocBytes(_In_ DWORD dwFlags, _In_opt_ T *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _ReallocBytes<T, CTLocalAllocPolicy>(NULL, dwFlags, pv, cb, ppv);
}
template <class T>
inline HRESULT LocalAllocObject(_In_ DWORD dwFlags, _Outptr_result_buffer_(1) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocBytes<T, CTLocalAllocPolicy>(NULL, dwFlags, sizeof(T), ppv);
}
template <class T>
inline HRESULT LocalAllocArray(_In_ DWORD dwFlags, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocArray<T, CTLocalAllocPolicy>(NULL, dwFlags, cItems, ppv);
}
template <class T>
inline HRESULT LocalReallocArray(_In_ DWORD dwFlags, _In_opt_ T *pv, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _ReallocArray<T, CTLocalAllocPolicy>(NULL, dwFlags, pv, cItems, ppv);
}
// Zero-initializing LocalAlloc helpers
template <class T>
inline HRESULT LocalAllocBytes(_In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return LocalAllocBytes(LMEM_ZEROINIT, cb, ppv);
}
template <class T>
inline HRESULT LocalReallocBytes(_In_opt_ T *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return LocalReallocBytes(LMEM_ZEROINIT, pv, cb, ppv);
}
template <class T>
inline HRESULT LocalAllocObject(_Outptr_result_buffer_(1) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return LocalAllocObject(LMEM_ZEROINIT, ppv);
}
template <class T>
inline HRESULT LocalAllocArray(_In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return LocalAllocArray(LMEM_ZEROINIT, cItems, ppv);
}
template <class T>
inline HRESULT LocalReallocArray(_In_opt_ T *pv, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return LocalReallocArray(LMEM_ZEROINIT, pv, cItems, ppv);
}
// LocalAlloc string helpers
inline HRESULT LocalAllocString(_In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PWSTR *ppsz)
{
return _AllocString<CTLocalAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, ppsz);
}
inline HRESULT LocalAllocStringLen( _In_reads_or_z_opt_(cch) PCNZWCH pszSource, _In_ size_t cch, _Outptr_result_buffer_(cch+1) _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
return _AllocStringLen<CTLocalAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, cch, ppsz);
}
inline HRESULT LocalAllocStringDoubleNullTerminate(_In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PZZWSTR *ppsz) //todo sal 00?
{
return _AllocStringDoubleNullTerminate<CTLocalAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, ppsz);
}
inline HRESULT LocalAllocStringOpt(_In_opt_ PCWSTR pszSource, _Outptr_result_maybenull_ _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
return _AllocStringOpt<CTLocalAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, ppsz);
}
#endif // NO_LOCALALLOC_HELPERS
#ifndef NO_HEAPALLOC_HELPERS
class CTHeapAllocPolicy
{
public:
static HRESULT Alloc(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) void **ppv)
{
*ppv = HeapAlloc(hHeap, dwFlags, cb);
return (*ppv) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT Realloc(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_opt_ void *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) void **ppv)
{
if (pv == NULL)
{
return Alloc(hHeap, dwFlags, cb, ppv);
}
*ppv = HeapReAlloc(hHeap, dwFlags, pv, cb);
return (*ppv) ? S_OK : E_OUTOFMEMORY;
}
};
// HeapAlloc helpers
template <class T>
inline HRESULT HeapAllocBytes(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocBytes<T, CTHeapAllocPolicy>(hHeap, dwFlags, cb, ppv);
}
template <class T>
inline HRESULT HeapReallocBytes(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_opt_ T *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _ReallocBytes<T, CTHeapAllocPolicy>(hHeap, dwFlags, pv, cb, ppv);
}
template <class T>
inline HRESULT HeapAllocObject(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _Outptr_result_buffer_(1) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocBytes<T, CTHeapAllocPolicy>(hHeap, dwFlags, sizeof(T), ppv);
}
template <class T>
inline HRESULT HeapAllocArray(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocArray<T, CTHeapAllocPolicy>(hHeap, dwFlags, cItems, ppv);
}
template <class T>
inline HRESULT HeapReallocArray(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_opt_ T *pv, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _ReallocArray<T, CTHeapAllocPolicy>(hHeap, dwFlags, pv, cItems, ppv);
}
// Zero-initializing HeapAlloc helpers (process heap)
template <class T>
inline HRESULT HeapAllocBytes(_In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return HeapAllocBytes(GetProcessHeap(), HEAP_ZERO_MEMORY, cb, ppv);
}
template <class T>
inline HRESULT HeapReallocBytes(_In_opt_ T *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return HeapReallocBytes(GetProcessHeap(), HEAP_ZERO_MEMORY, pv, cb, ppv);
}
template <class T>
inline HRESULT HeapAllocObject(_Outptr_result_buffer_(1) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return HeapAllocObject(GetProcessHeap(), HEAP_ZERO_MEMORY, ppv);
}
template <class T>
inline HRESULT HeapAllocArray(_In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return HeapAllocArray(GetProcessHeap(), HEAP_ZERO_MEMORY, cItems, ppv);
}
template <class T>
inline HRESULT HeapReallocArray(_In_opt_ T *pv, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return HeapReallocArray(GetProcessHeap(), HEAP_ZERO_MEMORY, pv, cItems, ppv);
}
// HeapAlloc string helpers
inline HRESULT HeapAllocString(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PWSTR *ppsz)
{
return _AllocString<CTHeapAllocPolicy>(hHeap, dwFlags, pszSource, ppsz);
}
inline HRESULT HeapAllocStringLen(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_reads_or_z_opt_(cch) PCNZWCH pszSource, _In_ size_t cch, _Outptr_result_buffer_(cch+1) _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
return _AllocStringLen<CTHeapAllocPolicy>(hHeap, dwFlags, pszSource, cch, ppsz);
}
inline HRESULT HeapAllocStringDoubleNullTerminate(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PZZWSTR *ppsz)
{
return _AllocStringDoubleNullTerminate<CTHeapAllocPolicy>(hHeap, dwFlags, pszSource, ppsz);
}
inline HRESULT HeapAllocStringOpt(_In_ HANDLE hHeap, _In_ DWORD dwFlags, _In_opt_ PCWSTR pszSource, _Outptr_result_maybenull_ _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
return _AllocStringOpt<CTHeapAllocPolicy>(hHeap, dwFlags, pszSource, ppsz);
}
// HeapAlloc string helpers (process heap)
inline HRESULT HeapAllocString(_In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PWSTR *ppsz)
{
return HeapAllocString(GetProcessHeap(), NO_ZERO_INIT, pszSource, ppsz);
}
inline HRESULT HeapAllocStringLen(_In_reads_opt_(cch) PCNZWCH pszSource, _In_ size_t cch, _Outptr_result_buffer_(cch+1) _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
return HeapAllocStringLen(GetProcessHeap(), NO_ZERO_INIT, pszSource, cch, ppsz);
}
inline HRESULT HeapAllocStringDoubleNullTerminate(_In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PZZWSTR *ppsz)
{
return HeapAllocStringDoubleNullTerminate(GetProcessHeap(), NO_ZERO_INIT, pszSource, ppsz);
}
inline HRESULT HeapAllocStringOpt(_In_opt_ PCWSTR pszSource, _Outptr_result_maybenull_ _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
return HeapAllocStringOpt(GetProcessHeap(), NO_ZERO_INIT, pszSource, ppsz);
}
#endif // NO_HEAPALLOC_HELPERS
#ifndef NO_GLOBALALLOC_HELPERS
class CTGlobalAllocPolicy
{
public:
static HRESULT Alloc(_In_opt_ HANDLE /*hHeap*/, _In_ DWORD dwFlags, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) void **ppv)
{
// ignore flags other than zero-init, assume fixed
*ppv = GlobalAlloc(GMEM_FIXED | (dwFlags & GMEM_ZEROINIT), cb);
return (*ppv) ? S_OK : E_OUTOFMEMORY;
}
static HRESULT Realloc(_In_opt_ HANDLE hHeap, _In_ DWORD dwFlags, _In_opt_ void *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) void **ppv)
{
if (pv == NULL)
{
return Alloc(hHeap, dwFlags, cb, ppv);
}
// GMEM_MOVEABLE is correct when reallocating GMEM_FIXED buffers
*ppv = GlobalReAlloc(pv, cb, GMEM_MOVEABLE | (dwFlags & GMEM_ZEROINIT));
return (*ppv) ? S_OK : E_OUTOFMEMORY;
}
};
// GlobalAlloc helpers
template <class T>
inline HRESULT GlobalAllocBytes(_In_ DWORD dwFlags, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocBytes<T, CTGlobalAllocPolicy>(NULL, dwFlags, cb, ppv);
}
template <class T>
inline HRESULT GlobalReallocBytes(_In_ DWORD dwFlags, _In_opt_ T *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _ReallocBytes<T, CTGlobalAllocPolicy>(NULL, dwFlags, pv, cb, ppv);
}
template <class T>
inline HRESULT GlobalAllocObject(_In_ DWORD dwFlags, _Outptr_result_buffer_(1) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocBytes<T, CTGlobalAllocPolicy>(NULL, dwFlags, sizeof(T), ppv);
}
template <class T>
inline HRESULT GlobalAllocArray(_In_ DWORD dwFlags, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _AllocArray<T, CTGlobalAllocPolicy>(NULL, dwFlags, cItems, ppv);
}
template <class T>
inline HRESULT GlobalReallocArray(_In_ DWORD dwFlags, _In_opt_ T *pv, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return _ReallocArray<T, CTGlobalAllocPolicy>(NULL, dwFlags, pv, cItems, ppv);
}
// Zero-initializing GlobalAlloc helpers
template <class T>
inline HRESULT GlobalAllocBytes(_In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return GlobalAllocBytes<T>(GMEM_ZEROINIT, cb, ppv);
}
template <class T>
inline HRESULT GlobalReallocBytes(_In_opt_ T *pv, _In_ size_t cb, _Outptr_result_bytebuffer_(cb) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return GlobalReallocBytes<T>(GMEM_ZEROINIT, pv, cb, ppv);
}
template <class T>
inline HRESULT GlobalAllocObject(_Outptr_result_buffer_(1) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return GlobalAllocObject<T>(GMEM_ZEROINIT, ppv);
}
template <class T>
inline HRESULT GlobalAllocArray(_In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return GlobalAllocArray<T>(GMEM_ZEROINIT, cItems, ppv);
}
template <class T>
inline HRESULT GlobalReallocArray(_In_opt_ T *pv, _In_ size_t cItems, _Outptr_result_buffer_(cItems) _On_failure_(_Post_satisfies_(*ppv == 0)) T **ppv)
{
return GlobalReallocArray<T>(GMEM_ZEROINIT, pv, cItems, ppv);
}
// GlobalAlloc string helpers
inline HRESULT GlobalAllocString(_In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PWSTR *ppsz)
{
return _AllocString<CTGlobalAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, ppsz);
}
inline HRESULT GlobalAllocStringLen( _In_reads_or_z_opt_(cch) PCNZWCH pszSource, _In_ size_t cch, _Outptr_result_buffer_(cch+1) _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
return _AllocStringLen<CTGlobalAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, cch, ppsz);
}
inline HRESULT GlobalAllocStringDoubleNullTerminate(_In_ PCWSTR pszSource, _Outptr_result_nullonfailure_ PZZWSTR *ppsz)
{
return _AllocStringDoubleNullTerminate<CTGlobalAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, ppsz);
}
inline HRESULT GlobalAllocStringOpt(_In_opt_ PCWSTR pszSource, _Outptr_result_maybenull_ _On_failure_(_Post_satisfies_(*ppsz == 0)) PWSTR *ppsz)
{
return _AllocStringOpt<CTGlobalAllocPolicy>(NULL, NO_ZERO_INIT, pszSource, ppsz);
}
#endif // NO_GLOBALALLOC_HELPERS
#endif // __cplusplus
#endif // __memsafe_h__

154
ExplorerPatcher/lvt.c

@ -517,13 +517,99 @@ void LVT_StartUI_EnableRoundedCorners(HWND hWnd, DWORD dwReceipe, DWORD dwPos, H
} }
} }
void LVT_StartDocked_120DPIHack(int maxHeight)
{
HRESULT hr = S_OK;
Windows_UI_Xaml_IDependencyObject* pRootDependencyObject = NULL;
if (SUCCEEDED(hr))
{
HSTRING_HEADER hshWindowStatics;
HSTRING hsWindowStatics = NULL;
hr = WindowsCreateStringReference(L"Windows.UI.Xaml.Window", 22, &hshWindowStatics, &hsWindowStatics);
if (SUCCEEDED(hr) && hsWindowStatics)
{
Windows_UI_Xaml_IWindowStatics* pWindowStatics = NULL;
hr = RoGetActivationFactory(hsWindowStatics, &IID_Windows_UI_Xaml_IWindowStatics, &pWindowStatics);
if (SUCCEEDED(hr))
{
Windows_UI_Xaml_IWindow* pWindow = NULL;
hr = pWindowStatics->lpVtbl->get_Current(pWindowStatics, &pWindow);
if (SUCCEEDED(hr))
{
IInspectable* pUIElement = NULL;
hr = pWindow->lpVtbl->get_Content(pWindow, &pUIElement);
if (SUCCEEDED(hr))
{
hr = pUIElement->lpVtbl->QueryInterface(pUIElement, &IID_Windows_UI_Xaml_IDependencyObject, &pRootDependencyObject);
pUIElement->lpVtbl->Release(pUIElement);
}
pWindow->lpVtbl->Release(pWindow);
}
pWindowStatics->lpVtbl->Release(pWindowStatics);
}
WindowsDeleteString(hsWindowStatics);
}
}
if (pRootDependencyObject)
{
HSTRING_HEADER hshVisualTreeHelperStatics;
HSTRING hsVisualTreeHelperStatics = NULL;
hr = WindowsCreateStringReference(L"Windows.UI.Xaml.Media.VisualTreeHelper", 38, &hshVisualTreeHelperStatics, &hsVisualTreeHelperStatics);
if (SUCCEEDED(hr) && hsVisualTreeHelperStatics)
{
Windows_UI_Xaml_IVisualTreeHelperStatics* pVisualTreeHelperStatics = NULL;
hr = RoGetActivationFactory(hsVisualTreeHelperStatics, &IID_Windows_UI_Xaml_IVisualTreeHelperStatics, &pVisualTreeHelperStatics);
if (SUCCEEDED(hr))
{
Windows_UI_Xaml_IDependencyObject* pStartSizingFrame = LVT_FindChildByClassName(pRootDependencyObject, pVisualTreeHelperStatics, L"StartDocked.StartSizingFrame", NULL);
if (pStartSizingFrame)
{
Windows_UI_Xaml_IUIElement* pIUIElement = NULL;
pStartSizingFrame->lpVtbl->QueryInterface(pStartSizingFrame, &IID_Windows_UI_Xaml_IUIElement, &pIUIElement);
if (pIUIElement)
{
Windows_UI_Xaml_IFrameworkElement* pFrameworkElement = NULL;
pStartSizingFrame->lpVtbl->QueryInterface(pStartSizingFrame, &IID_Windows_UI_Xaml_IFrameworkElement, &pFrameworkElement);
if (pFrameworkElement)
{
if (!IsWindows11Version22H2Build1413OrHigher()) pIUIElement->lpVtbl->put_Visibility(pIUIElement, Windows_UI_Xaml_Visibility_Collapsed);
pFrameworkElement->lpVtbl->put_MaxHeight(pFrameworkElement, maxHeight);
if (!IsWindows11Version22H2Build1413OrHigher()) pIUIElement->lpVtbl->put_Visibility(pIUIElement, Windows_UI_Xaml_Visibility_Visible);
pFrameworkElement->lpVtbl->Release(pFrameworkElement);
}
pIUIElement->lpVtbl->Release(pIUIElement);
}
pStartSizingFrame->lpVtbl->Release(pStartSizingFrame);
}
pVisualTreeHelperStatics->lpVtbl->Release(pVisualTreeHelperStatics);
}
WindowsDeleteString(hsVisualTreeHelperStatics);
}
pRootDependencyObject->lpVtbl->Release(pRootDependencyObject);
}
}
// Reference: https://www.reddit.com/r/Windows11/comments/p1ksou/this_is_not_a_concept_microsoft_in_windows_11/ // Reference: https://www.reddit.com/r/Windows11/comments/p1ksou/this_is_not_a_concept_microsoft_in_windows_11/
void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply) void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply, RECT* rect)
{ {
WCHAR wszDebug[MAX_PATH]; WCHAR wszDebug[MAX_PATH];
HRESULT hr = S_OK; HRESULT hr = S_OK;
Windows_UI_Xaml_IDependencyObject* pRootDependencyObject = NULL; Windows_UI_Xaml_IDependencyObject* pRootDependencyObject = NULL;
Windows_UI_Xaml_Controls_ICanvasStatics* pCanvasStatics = NULL;
if (SUCCEEDED(hr))
{
HSTRING_HEADER hshControlsCanvasStatics;
HSTRING hsControlsCanvasStatics = NULL;
hr = WindowsCreateStringReference(L"Windows.UI.Xaml.Controls.Canvas", 31, &hshControlsCanvasStatics, &hsControlsCanvasStatics);
if (SUCCEEDED(hr) && hsControlsCanvasStatics)
{
hr = RoGetActivationFactory(hsControlsCanvasStatics, &IID_Windows_UI_Xaml_Controls_ICanvasStatics, &pCanvasStatics);
WindowsDeleteString(hsControlsCanvasStatics);
}
}
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
@ -570,6 +656,49 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply)
Windows_UI_Xaml_IDependencyObject* pStartSizingFrame = LVT_FindChildByClassName(pRootDependencyObject, pVisualTreeHelperStatics, L"StartDocked.StartSizingFrame", NULL); Windows_UI_Xaml_IDependencyObject* pStartSizingFrame = LVT_FindChildByClassName(pRootDependencyObject, pVisualTreeHelperStatics, L"StartDocked.StartSizingFrame", NULL);
if (pStartSizingFrame) if (pStartSizingFrame)
{ {
Windows_UI_Xaml_Thickness drc;
drc.Left = 0.0; drc.Right = 0.0; drc.Top = 0.0; drc.Bottom = 0.0;
Windows_UI_Xaml_IUIElement* pIUIElement = NULL;
Windows_UI_Xaml_IFrameworkElement* pFrameworkElement = NULL;
pStartSizingFrame->lpVtbl->QueryInterface(pStartSizingFrame, &IID_Windows_UI_Xaml_IUIElement, &pIUIElement);
if (pIUIElement)
{
pCanvasStatics->lpVtbl->GetLeft(pCanvasStatics, pIUIElement, &(drc.Left));
pCanvasStatics->lpVtbl->GetTop(pCanvasStatics, pIUIElement, &(drc.Top));
}
pStartSizingFrame->lpVtbl->QueryInterface(pStartSizingFrame, &IID_Windows_UI_Xaml_IFrameworkElement, &pFrameworkElement);
if (pFrameworkElement)
{
pFrameworkElement->lpVtbl->get_ActualWidth(pFrameworkElement, &(drc.Right));
pFrameworkElement->lpVtbl->get_ActualHeight(pFrameworkElement, &(drc.Bottom));
}
UINT dpi = GetDpiForWindow(hWnd);
RECT rc;
SetRect(&rc, drc.Left, drc.Top, drc.Right, drc.Bottom);
SetRect(&rc, MulDiv(rc.left, dpi, 96), MulDiv(rc.top, dpi, 96), MulDiv(rc.right, dpi, 96), MulDiv(rc.bottom, dpi, 96));
*rect = rc;
if (bApply && dpi == 120)
{
HANDLE hRealThreadHandle = NULL;
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hRealThreadHandle, THREAD_SET_CONTEXT, FALSE, 0);
if (hRealThreadHandle)
{
QueueUserAPC(LVT_StartDocked_120DPIHack, hRealThreadHandle, 826);
CloseHandle(hRealThreadHandle);
}
}
else if (pFrameworkElement)
{
pFrameworkElement->lpVtbl->put_MaxHeight(pFrameworkElement, 726.0);
}
if (pFrameworkElement)
{
pFrameworkElement->lpVtbl->Release(pFrameworkElement);
}
if (pIUIElement)
{
pIUIElement->lpVtbl->Release(pIUIElement);
}
Windows_UI_Xaml_IDependencyObject* pStartSizingFramePanel = LVT_FindChildByClassName(pStartSizingFrame, pVisualTreeHelperStatics, L"StartDocked.StartSizingFramePanel", NULL); Windows_UI_Xaml_IDependencyObject* pStartSizingFramePanel = LVT_FindChildByClassName(pStartSizingFrame, pVisualTreeHelperStatics, L"StartDocked.StartSizingFramePanel", NULL);
if (pStartSizingFramePanel) if (pStartSizingFramePanel)
{ {
@ -585,7 +714,13 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply)
Windows_UI_Xaml_IDependencyObject* pLauncherFrame = LVT_FindChildByClassName(pContentPresenter2, pVisualTreeHelperStatics, L"StartDocked.LauncherFrame", NULL); Windows_UI_Xaml_IDependencyObject* pLauncherFrame = LVT_FindChildByClassName(pContentPresenter2, pVisualTreeHelperStatics, L"StartDocked.LauncherFrame", NULL);
if (pLauncherFrame) if (pLauncherFrame)
{ {
Windows_UI_Xaml_IDependencyObject* pRootGrid = LVT_FindChildByName(pLauncherFrame, pVisualTreeHelperStatics, L"RootGrid"); Windows_UI_Xaml_IDependencyObject* pRootPanel = LVT_FindChildByName(pLauncherFrame, pVisualTreeHelperStatics, L"RootPanel");
Windows_UI_Xaml_IDependencyObject* pRootGridParent = pRootPanel;
if (!pRootGridParent)
{
pRootGridParent = pLauncherFrame;
}
Windows_UI_Xaml_IDependencyObject* pRootGrid = LVT_FindChildByName(pRootGridParent, pVisualTreeHelperStatics, L"RootGrid");
if (pRootGrid) if (pRootGrid)
{ {
Windows_UI_Xaml_IDependencyObject* pRootContent = LVT_FindChildByName(pRootGrid, pVisualTreeHelperStatics, L"RootContent"); Windows_UI_Xaml_IDependencyObject* pRootContent = LVT_FindChildByName(pRootGrid, pVisualTreeHelperStatics, L"RootContent");
@ -622,13 +757,17 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply)
pStartMenuPinnedList->lpVtbl->QueryInterface(pStartMenuPinnedList, &IID_Windows_UI_Xaml_IFrameworkElement, &pFrameworkElement); pStartMenuPinnedList->lpVtbl->QueryInterface(pStartMenuPinnedList, &IID_Windows_UI_Xaml_IFrameworkElement, &pFrameworkElement);
if (pFrameworkElement) if (pFrameworkElement)
{ {
static double StartMenuPinnedList_Height = 252.0;
double tempStartMenuPinnedList_Height = 0.0;
if (SUCCEEDED(pFrameworkElement->lpVtbl->get_Height(pFrameworkElement, &tempStartMenuPinnedList_Height)) && tempStartMenuPinnedList_Height != 510.0) StartMenuPinnedList_Height = tempStartMenuPinnedList_Height;
if (bApply) if (bApply)
{ {
pFrameworkElement->lpVtbl->put_Height(pFrameworkElement, 510.0); pFrameworkElement->lpVtbl->put_Height(pFrameworkElement, 510.0);
} }
else else
{ {
pFrameworkElement->lpVtbl->put_Height(pFrameworkElement, 252.0); pFrameworkElement->lpVtbl->put_Height(pFrameworkElement, StartMenuPinnedList_Height);
} }
pFrameworkElement->lpVtbl->Release(pFrameworkElement); pFrameworkElement->lpVtbl->Release(pFrameworkElement);
} }
@ -676,6 +815,10 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply)
} }
pRootGrid->lpVtbl->Release(pRootGrid); pRootGrid->lpVtbl->Release(pRootGrid);
} }
if (pRootPanel)
{
pRootPanel->lpVtbl->Release(pRootPanel);
}
pLauncherFrame->lpVtbl->Release(pLauncherFrame); pLauncherFrame->lpVtbl->Release(pLauncherFrame);
} }
pContentPresenter2->lpVtbl->Release(pContentPresenter2); pContentPresenter2->lpVtbl->Release(pContentPresenter2);
@ -694,6 +837,11 @@ void LVT_StartDocked_DisableRecommendedSection(HWND hWnd, BOOL bApply)
} }
pRootDependencyObject->lpVtbl->Release(pRootDependencyObject); pRootDependencyObject->lpVtbl->Release(pRootDependencyObject);
} }
if (pCanvasStatics)
{
pCanvasStatics->lpVtbl->Release(pCanvasStatics);
}
} }
HRESULT IsThreadCoreWindowVisible(BOOL* bIsVisible) HRESULT IsThreadCoreWindowVisible(BOOL* bIsVisible)

10
ExplorerPatcher/lvt.h

@ -6,6 +6,8 @@
#include <roapi.h> #include <roapi.h>
#include <winstring.h> #include <winstring.h>
#include <stdio.h> #include <stdio.h>
#include <Shlwapi.h>
#include "osutility.h"
#define LVT_LOC_NONE 0 #define LVT_LOC_NONE 0
#define LVT_LOC_BOTTOMLEFT 1 #define LVT_LOC_BOTTOMLEFT 1
@ -460,10 +462,12 @@ typedef struct Windows_UI_Xaml_IFrameworkElement_Vtbl
__RPC__in Windows_UI_Xaml_IFrameworkElement* This); __RPC__in Windows_UI_Xaml_IFrameworkElement* This);
HRESULT(STDMETHODCALLTYPE* get_MaxHeight)( HRESULT(STDMETHODCALLTYPE* get_MaxHeight)(
__RPC__in Windows_UI_Xaml_IFrameworkElement* This); __RPC__in Windows_UI_Xaml_IFrameworkElement* This,
/* [out] */ __RPC__out DOUBLE* value);
HRESULT(STDMETHODCALLTYPE* put_MaxHeight)( HRESULT(STDMETHODCALLTYPE* put_MaxHeight)(
__RPC__in Windows_UI_Xaml_IFrameworkElement* This); __RPC__in Windows_UI_Xaml_IFrameworkElement* This,
/* [in] */ __RPC__in DOUBLE value);
HRESULT(STDMETHODCALLTYPE* get_HorizontalAlignment)( HRESULT(STDMETHODCALLTYPE* get_HorizontalAlignment)(
__RPC__in Windows_UI_Xaml_IFrameworkElement* This); __RPC__in Windows_UI_Xaml_IFrameworkElement* This);
@ -1024,7 +1028,7 @@ Windows_UI_Xaml_IDependencyObject* LVT_FindChildByName(Windows_UI_Xaml_IDependen
void LVT_StartUI_EnableRoundedCorners(HWND, DWORD, DWORD, HWND, RECT*); void LVT_StartUI_EnableRoundedCorners(HWND, DWORD, DWORD, HWND, RECT*);
void LVT_StartDocked_DisableRecommendedSection(HWND, BOOL); void LVT_StartDocked_DisableRecommendedSection(HWND, BOOL, RECT*);
HRESULT IsThreadCoreWindowVisible(BOOL*); HRESULT IsThreadCoreWindowVisible(BOOL*);
#endif #endif

47
ExplorerPatcher/osutility.h

@ -20,6 +20,10 @@
#endif #endif
#define DWMWA_MICA_EFFFECT 1029 #define DWMWA_MICA_EFFFECT 1029
#ifdef __cplusplus
extern "C" {
#endif
extern RTL_OSVERSIONINFOW global_rovi; extern RTL_OSVERSIONINFOW global_rovi;
extern DWORD32 global_ubr; extern DWORD32 global_ubr;
@ -55,4 +59,47 @@ inline HRESULT SetMicaMaterialForThisWindow(HWND hWnd, BOOL bApply)
DWORD dwProp = (bApply ? ((global_rovi.dwBuildNumber >= 22523) ? 2 : 1) : 0); DWORD dwProp = (bApply ? ((global_rovi.dwBuildNumber >= 22523) ? 2 : 1) : 0);
return DwmSetWindowAttribute(hWnd, dwAttribute, &dwProp, sizeof(DWORD)); return DwmSetWindowAttribute(hWnd, dwAttribute, &dwProp, sizeof(DWORD));
} }
inline BOOL IsWindows11Version22H2OrHigher()
{
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
return global_rovi.dwBuildNumber >= 22621;
}
inline BOOL IsWindows11Version23H2OrHigher()
{
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
return global_rovi.dwBuildNumber >= 22631;
}
inline BOOL IsWindows11BuildHigherThan25158()
{
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
return global_rovi.dwBuildNumber > 25158;
}
inline BOOL IsWindows11Build25346OrHigher()
{
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
return global_rovi.dwBuildNumber >= 25346;
}
inline BOOL IsWindows11Version22H2Build1413OrHigher()
{
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
if (global_rovi.dwBuildNumber > 22621) return TRUE;
return global_rovi.dwBuildNumber == 22621 && global_ubr >= 1413;
}
inline BOOL IsWindows11Version22H2Build2134OrHigher()
{
if (!global_rovi.dwMajorVersion) global_ubr = VnGetOSVersionAndUBR(&global_rovi);
if (global_rovi.dwBuildNumber > 22621) return TRUE;
return global_rovi.dwBuildNumber == 22621 && global_ubr >= 2134;
}
#ifdef __cplusplus
}
#endif
#endif #endif

5
ExplorerPatcher/packages.config

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="KNSoft.SlimDetours" version="1.1.4-beta" targetFramework="win10.0.22621" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.250325.1" targetFramework="native" />
</packages>

16
ExplorerPatcher/resource.h

@ -2,20 +2,20 @@
// Microsoft Visual C++ generated include file. // Microsoft Visual C++ generated include file.
// Used by ExplorerPatcher.rc // Used by ExplorerPatcher.rc
// //
#define IDR_REGISTRY1 101
#define IDS_PRODUCTNAME 102 #define IDS_PRODUCTNAME 102
#define IDS_COPYRIGHT 103
#define IDS_VERSION 104
#define IDS_PRODUCTTAG 105
#define IDS_VISITGITHUB 106
#define IDS_VISITWEBSITE 107
#define IDS_LICENSEINFO 108
#define IDS_INSTALL_SUCCESS_TEXT 109 #define IDS_INSTALL_SUCCESS_TEXT 109
#define IDS_INSTALL_ERROR_TEXT 110 #define IDS_INSTALL_ERROR_TEXT 110
#define IDS_UNINSTALL_SUCCESS_TEXT 111 #define IDS_UNINSTALL_SUCCESS_TEXT 111
#define IDS_UNINSTALL_ERROR_TEXT 112 #define IDS_UNINSTALL_ERROR_TEXT 112
#define IDS_OPERATION_NONE 113 #define IDS_OPERATION_NONE 113
#define IDR_REGISTRY2 114 #define IDR_REFRESHEDSTYLES_XBF 115
#define IDS_DRIVECATEGORY_HARDDISKDRIVES 40000
#define IDS_DRIVECATEGORY_REMOVABLESTORAGE 40001
#define IDS_DRIVECATEGORY_OTHER 40002
#define IDS_DRIVECATEGORY_IMAGING 40003
#define IDS_DRIVECATEGORY_PORTABLEMEDIA 40004
#define IDS_DRIVECATEGORY_PORTABLEMEDIADEVICE 40004
#define IDS_DRIVECATEGORY_PORTABLEDEVICE 40005
// Next default values for new objects // Next default values for new objects
// //

669
ExplorerPatcher/settings.reg

@ -1,669 +0,0 @@
Windows Registry Editor Version 5.00
;M Settings
;q
;T Taskbar
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 2 Taskbar style *
;x 0 Windows 11 (default)
;x 1 Windows 10
"OldTaskbar"=dword:00000001
;y More taskbar options in the Settings app 🡕
;ms-settings:taskbar
;y Customize notification area icons 🡕
;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}
;y Customize system icons in the notification area 🡕
;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}\SystemIcons
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 4 Primary taskbar location on screen *
;x 3 Bottom (default)
;x 1 Top
;x 0 Left
;x 2 Right
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_TaskbarPosition"=dword:00000003
;c 4 Secondary taskbar(s) location on screen
;x 3 Bottom (default)
;x 1 Top
;x 0 Left
;x 2 Right
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_MMTaskbarPosition"=dword:00000003
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 3 Extra button should be
;x 0 Hidden (default)
;x 2 Shown and open Cortana
;x 1 Shown and open Widgets
"TaskbarDa"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search]
;b Show Search button
"SearchboxTaskbarMode"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b Show Task view button
"ShowTaskViewButton"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b Show Desktop button
"TaskbarSD"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Automatically hide the taskbar
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_AutoHideTaskbar"=dword:00000000
;t The following settings only apply to the Windows 10 taskbar:
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 2 Start button style
;x 0 Windows 10 (default)
;x 1 Windows 11
"OrbStyle"=dword:00000000
;c 5 Primary taskbar alignment
;x 0 At screen edge (default)
;x 1 Centered
;x 5 Centered, at screen edge when full
;x 3 Centered with Start button
;x 7 Centered with Start button, at screen edge when full
"OldTaskbarAl"=dword:00000000
;c 5 Secondary taskbar(s) alignment
;x 0 At screen edge (default)
;x 1 Centered
;x 5 Centered, at screen edge when full
;x 3 Centered with Start button
;x 7 Centered with Start button, at screen edge when full
"MMOldTaskbarAl"=dword:00000000
;c 3 Combine taskbar icons on primary taskbar
;x 0 Always combine
;x 1 Combine when taskbar is full
;x 2 Never combine (default)
"TaskbarGlomLevel"=dword:00000002
;c 3 Combine taskbar icons on secondary taskbar(s)
;x 0 Always combine
;x 1 Combine when taskbar is full
;x 2 Never combine (default)
"MMTaskbarGlomLevel"=dword:00000002
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 2 Taskbar icon size
;x 1 Small
;x 0 Large (default)
"TaskbarSmallIcons"=dword:00000000
;e
;T System tray
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Skin taskbar and tray pop-up menus
"SkinMenus"=dword:00000001
;b Center tray icon pop-up menus
"CenterMenus"=dword:00000001
;b Flyout behavior for tray icon pop-up menus
"FlyoutMenus"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7]
;b Show touch keyboard button *
"TipbandDesiredVisibility"=dword:00000000
;t The following settings only apply to the Windows 10 taskbar:
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;p 2
;b Apply Windows 11 style to system tray icons *
"SkinIcons"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b Show seconds in the clock
"ShowSecondsInSystemClock"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Hide Control Center button *
"HideControlCenterButton"=dword:00000000
;a Choosing 'Open Network && Internet settings' when right clicking the
;c 3 network icon should open:
;x 0 Network section in the Settings app (default)
;x 1 Network and Sharing Center in Control Panel
;x 2 Network Connections in Control Panel
"ReplaceNetwork"=dword:00000000
;q
;t When clicking a system icon in the Windows 10 taskbar system tray, open:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Control Panel\Settings\Network]
;c 7 Network
;x 6 Control Center
;x 5 Windows 11 WiFi flyout
;x 0 Windows 10 flyout (default)
;x 2 Windows 8 flyout
;x 1 Network section in the Settings app
;x 3 Network and Sharing Center in Control Panel
;x 4 Network Connections in Control Panel
"ReplaceVan"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC]
;c 2 Sound
;x 1 Windows 10 flyout (default)
;x 0 Windows 7 flyout
"EnableMtcUvc"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell]
;c 3 Clock
;x 2 Windows 11 flyout
;x 0 Windows 10 flyout (default)
;x 1 Windows 7
"UseWin32TrayClockExperience"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell]
;c 2 Battery
;x 0 Windows 10 flyout (default)
;x 1 Windows 7
"UseWin32BatteryFlyout"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 3 Language switcher *
;x 0 Windows 11 (default)
;x 1 Windows 10 (with link to "Language Preferences")
;x 4 Windows 10
"IMEStyle"=dword:00000000
;T File Explorer
;e For the settings marked with (**) to work in Open or Save file dialogs as well, register
;e this utility as shell extension using the option below.
;y Learn more 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Using-ExplorerPatcher-as-shell-extension
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;q
;b Register as shell extension
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_RegisterAsShellExtension"=dword:00000000
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{d93ed569-3b3e-4bff-8355-3c44f6a52bb5}\InprocServer32]
;d Disable the Windows 11 command bar *
@=""
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32]
;d Disable the Windows 11 context menu *
@=""
;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 **
"DisableImmersiveContextMenu"=dword:00000000
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32]
;d Disable navigation bar **
@=""
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs]
;d Disable modern search bar
@="{64bc32b5-4eec-4de7-972d-bd8bd0324537}"
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Hide search bar completely **
"HideExplorerSearchBar"=dword:00000000
;c 4 Title bar
;x 0 Show icon and title (default)
;x 1 Hide title, show icon
;x 2 Hide icon, show title
;x 3 Hide icon and title
"HideIconAndTitleInExplorer"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 3 Apply Mica effect on these areas
;x 0 Let File Explorer decide (default)
;x 1 Title bar, command bar and navigation bar
;x 2 Nowhere
"MicaEffectOnTitlebar"=dword:00000000
;T Start menu
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;z 2 Start menu style
;x 0 Windows 11 (default)
;x 1 Windows 10
"Start_ShowClassicMode"=dword:00000000
;y More Start menu options in the Settings app 🡕
;ms-settings:personalization-start
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 2 Position on screen
;x 0 At screen edge
;x 1 Center (default)
"TaskbarAl"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 22 Maximum number of frequent apps to show
;x 0 None
;x 1 1
;x 2 2
;x 3 3
;x 4 4
;x 5 5
;x 6 6 (default)
;x 7 7
;x 8 8
;x 9 9
;x 10 10
;x 11 11
;x 12 12
;x 13 13
;x 14 14
;x 15 15
;x 16 16
;x 17 17
;x 18 18
;x 19 19
;x 20 20
;x 99999 Unlimited
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_Start_MaximumFrequentApps"=dword:00000006
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage]
;a When using multiple displays, open Start on this monitor when invoked using
;c 10 the keyboard
;x 1 Primary monitor (default)
;x 0 Monitor on which the cursor is on
;x 2 Monitor #2
;x 3 Monitor #3
;x 4 Monitor #4
;x 5 Monitor #5
;x 6 Monitor #6
;x 7 Monitor #7
;x 8 Monitor #8
;x 9 Monitor #9
"MonitorOverride"=dword:00000001
;t The following settings only apply to the Windows 11 Start menu:
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Disable the "Recommended" section
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartDocked_DisableRecommendedSection"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage]
;b Open Start in All apps by default
"MakeAllAppsDefault"=dword:00000000
;t The following settings only apply to the Windows 10 Start menu:
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Show more tiles
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartUI_ShowMoreTiles"=dword:00000000
;c 3 Corner preference
;x 1 Rounded corners, floating menu
;x 2 Rounded corners, docked menu
;x 0 Not rounded
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartUI_EnableRoundedCorners"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 3 Display mode
;x 0 Default
;x 1 Start menu
;x 2 Full screen Start
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_ForceStartSize"=dword:00000000
;c 3 App list
;x 0 Display
;x 3 Hide
;x 1 Disable
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_NoStartMenuMorePrograms"=dword:00000000
;u Pin tiles to Windows 10 Start menu from File Explorer
;pin_tiles
;T Window switcher
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
;z 4 Window switcher (Alt+Tab) style *
;x 0 Windows 11 (default)
;x 3 Windows 10
;x 1 Windows NT
;x 2 Simple Window Switcher
"AltTabSettings"=dword:00000000
;t The following settings only apply to the Simple Window Switcher:
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;b Include desktop
"IncludeWallpaper"=dword:00000001
;b Always show on primary monitor
"PrimaryOnly"=dword:00000000
;b Show windows only from current monitor
"PerMonitor"=dword:00000000
;b Display only the most recent window (per application switcher)
"SwitcherIsPerApplication"=dword:00000000
;b %PLACEHOLDER_0001%
"NoPerApplicationList"=dword:00000000
;c 3 Theme
;x 0 Default
;x 1 Acrylic
;x 2 Mica (always opaque)
"Theme"=dword:00000000
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MultitaskingView\AltTabViewHost]
;c 19 Opacity
;x 100 Opaque
;x 98 98 %
;x 96 96 %
;x 95 95 % (default)
;x 94 94 %
;x 92 92 %
;x 90 90 %
;x 85 85 %
;x 80 80 %
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
;x 50 50 %
;x 45 45 %
;x 40 40 %
;x 35 35 %
;x 30 30 %
"Grid_backgroundPercent"=dword:0000005F
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;c 3 Color scheme
;x 0 Follow system setting (default)
;x 1 Light
;x 2 Dark
"ColorScheme"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;c 3 Corner preference
;x 2 Rounded (default)
;x 3 Small rounded
;x 1 Not rounded
"CornerPreference"=dword:00000002
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;c 20 Row height
;x 330 330 pt
;x 320 320 pt
;x 310 310 pt
;x 300 300 pt
;x 290 290 pt
;x 280 280 pt
;x 270 270 pt
;x 260 260 pt
;x 250 250 pt
;x 240 240 pt
;x 230 230 pt (default)
;x 220 220 pt
;x 210 210 pt
;x 200 200 pt
;x 190 190 pt
;x 180 180 pt
;x 170 170 pt
;x 160 160 pt
;x 150 150 pt
;x 140 140 pt
"RowHeight"=dword:000000e6
;c 10 Maximum width (percentage of screen width)
;x 100 100 % (not recommended)
;x 95 95 %
;x 90 90 %
;x 85 85 %
;x 80 80 % (default)
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
"MaxWidth"=dword:00000050
;c 10 Maximum height (percentage of screen height)
;x 100 100 % (not recommended)
;x 95 95 %
;x 90 90 %
;x 85 85 %
;x 80 80 % (default)
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
"MaxHeight"=dword:00000050
;c 11 Window padding
;x 50 50 pt
;x 45 45 pt
;x 40 40 pt
;x 35 30 pt
;x 30 30 pt
;x 25 25 pt
;x 20 20 pt (default)
;x 15 15 pt
;x 10 10 pt
;x 5 5 pt
;x 0 None
"MasterPadding"=dword:00000014
;c 11 Show delay
;x 0 None
;x 25 25 ms
;x 50 50 ms
;x 75 75 ms
;x 100 100 ms (default)
;x 125 125 ms
;x 150 150 ms
;x 200 200 ms
;x 300 300 ms
;x 400 400 ms
;x 500 500 ms
"ShowDelay"=dword:00000064
;q
;y Learn more about Simple Window Switcher 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Simple-Window-Switcher
;T Weather
;t The following settings only apply to the Windows 10 taskbar:
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Show Weather on the taskbar
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_PeopleBand"=dword:00000000
;w Location
;Search City or Zip Code; the program looks up "weather in /* what you typed */" on Google. Leave blank for the default value (current location).
;Current location (default)
"WeatherLocation"=""
;c 5 Layout
;x 0 Icon and description (default)
;x 3 Icon and temperature
;x 1 Icon only
;x 4 Temperature only
;x 5 Temperature and description
"WeatherViewMode"=dword:00000000
;c 3 Widget size
;x 0 Automatic (fit contents) (default)
;x 2 Automatic (fit contents) with threshold
;x 1 Fixed
"WeatherFixedSize"=dword:00000000
;c 2 Widget position
;x 0 Right / bottom (default)
;x 1 Left / top
"WeatherToLeft"=dword:00000000
;c 7 Update frequency
;x 60 Every minute
;x 300 Every 5 minutes
;x 900 Every 15 minutes
;x 1200 Every 20 minutes (default)
;x 1800 Every half an hour
;x 3600 Every hour
;x 7200 Every couple of hours
"WeatherContentUpdateMode"=dword:000004B0
;c 2 Temperature unit
;x 0 Celsius (default)
;x 1 Fahrenheit
"WeatherTemperatureUnit"=dword:00000000
;;;c 2 Location accuracy
;;;x 0 Generic (based on the IP address) (default)
;;;x 1 Precise (geolocation)
;;"WeatherLocationType"=dword:00000000
;w Language
;Type the short code for the language you'd like the weather data to be displayed in. For example, try "en", "ro", "de", "fr" etc. Leave blank for the default value (language of the Windows OS).
;System language (default)
"WeatherLanguage"=""
;c 3 Color scheme
;x 0 Follow system setting (default)
;x 1 Light
;x 2 Dark
"WeatherTheme"=dword:00000000
;c 3 Corner preference
;x 2 Rounded (default)
;x 3 Small rounded
;x 1 Not rounded
"WeatherWindowCornerPreference"=dword:00000002
;c 2 Icon pack
;x 0 Microsoft (default)
;x 1 Google
"WeatherIconPack"=dword:00000000
;c 2 Display widget contents
;x 0 On a single line (default)
;x 1 On 2 lines, if possible
"WeatherContentsMode"=dword:00000000
;c 17 Zoom
;x 25 25 %
;x 33 33 %
;x 50 50 %
;x 67 67 %
;x 75 75 %
;x 80 80 %
;x 90 90 %
;x 0 100 % (default)
;x 110 110 %
;x 125 125 %
;x 150 150 %
;x 175 175 %
;x 200 200 %
;x 250 250 %
;x 300 300 %
;x 400 400 %
;x 500 500 %
"WeatherZoomFactor"=dword:00000000
;q
;y Learn more about the Weather taskbar widget 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Weather
;t %WEATHERLASTUPDATETEXT%
;u Update weather now
;update_weather
;u Clear weather widget local data
;clear_data_weather
;T Other
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Remember last used section in this window
"LastSectionInProperties"=dword:00000000
;b Open clock flyout when pressing Win+C instead of Microsoft Teams *
"ClockFlyoutOnWinC"=dword:00000000
;b Show separators between taskbar toolbars *
"ToolbarSeparators"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b Show Command Prompt instead of PowerShell in Win+X menu *
"DontUsePowerShellOnWinX"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Add shortcut to program settings in Win+X menu
"PropertiesInWinX"=dword:00000000
;b Remove shortcut key from program settings item in Win+X menu
"NoMenuAccelerator"=dword:00000000
;b Disable Office hotkeys (Ctrl+Alt+Shift+Windows key combinations) *
"DisableOfficeHotkeys"=dword:00000000
;b Disable rounded corners for application windows
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableRoundedCorners"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 6 Default action in the Alt+F4 dialog on the desktop
;x 256 Switch user
;x 1 Sign out
;x 16 Sleep
;x 64 Hibernate
;x 2 Shut down (default)
;x 4 Restart
"Start_PowerButtonAction"=dword:00000002
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 2 Snap Assist style
;x 0 Windows 11 (default)
;x 3 Windows 10
"SnapAssistSettings"=dword:00000000
;t Prevent the following Control Panel links from being redirected to the Settings app:
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b System / About page
"DoNotRedirectSystemToSettingsApp"=dword:00000000
;b Programs and Features
"DoNotRedirectProgramsAndFeaturesToSettingsApp"=dword:00000000
;b Adjust date/time
"DoNotRedirectDateAndTimeToSettingsApp"=dword:00000000
;b Customize notification icons
"DoNotRedirectNotificationIconsToSettingsApp"=dword:00000000
;T Updates
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 3 When File Explorer starts
;x 1 Notify about available updates (default)
;x 0 Prompt to install available updates
;x 2 Do not check for updates
"UpdatePolicy"=dword:00000001
;b Receive pre-release versions, if available (not recommended)
"UpdatePreferStaging"=dword:00000000
;b Suggest the latest version on the server, even if it's older (not recommended)
"UpdateAllowDowngrades"=dword:00000000
;t Update servers:
;w Releases
;Type a URL that serves resources adhering to GitHub's releases API. To learn how to configure your own update server, please consult the wiki.
;github.com/valinet/ExplorerPatcher/releases/latest
"UpdateURL"=""
;w Pre-releases
;Type a URL that serves resources adhering to GitHub's pre-releases API. To learn how to configure your own update server, please consult the wiki.
;api.github.com/repos/valinet/ExplorerPatcher/releases?per_page=1
"UpdateURLStaging"=""
;y Check for updates
;;;EP_CHECK_FOR_UPDATES
;y Update program and restart File Explorer
;;;EP_INSTALL_UPDATES
;y Read about changes in the latest releases 🡕
;https://github.com/valinet/ExplorerPatcher/blob/master/CHANGELOG.md
;y Learn more 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Configure-updates
;T Advanced
;e Only change these settings after reading the documentation about them.
;y Learn more 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/About-advanced-settings
;q
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Enable console
"AllocConsole"=dword:00000000
;b Dump memory leaks
"Memcheck"=dword:00000000
;b Double click taskbar to toggle auto-hide (only works when the taskbar is locked)
"TaskbarAutohideOnDoubleClick"=dword:00000000
[HKEY_CURRENT_USER\Control Panel\Desktop]
;b Show Windows build info on the desktop *
"PaintDesktopVersion"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Enable advanced mitigations for correct rendering using classic theme *
"ClassicThemeMitigations"=dword:00000000
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{1eeb5b5a-06fb-4732-96b3-975c0194eb39}\InprocServer32]
;d Enable SysListView32 for Explorer views *
@=""
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Hide the program settings item ("Properties") from the taskbar context menu
"NoPropertiesInContextMenu"=dword:00000000
;b Enable symbols download *
"EnableSymbolDownload"=dword:00000001
;c 12 Supplementary delay at logon *
;x 0 None (default)
;x 300 300 ms
;x 600 600 ms
;x 1000 1 second
;x 1500 1.5 seconds
;x 2000 2 seconds
;x 3000 3 seconds
;x 4000 4 seconds
;x 5000 5 seconds
;x 6000 6 seconds
;x 8000 8 seconds
;x 10000 10 seconds
"ExplorerReadyDelay"=dword:00000000
;t The following settings only apply to the Windows 10 taskbar:
;b Pinned items act as quick launch (don't group pinned items with active apps) *
"PinnedItemsActAsQuickLaunch"=dword:00000000
;b When the taskbar shows button labels, remove the extra gap around pinned items *
"RemoveExtraGapAroundPinnedItems"=dword:00000000
;T About
;e ExplorerPatcher
;e Version %VERSIONINFORMATIONSTRING%
;t © 2006-2022 VALINET Solutions SRL. All rights reserved.
;e
;e This project aims to enhance the working environment on Windows.
;e Proudly engineered by Valentin-Gabriel Radu.
;t Running on Windows 11, OS Build %OSVERSIONSTRING%
;y Visit project GitHub (https://github.com/valinet) 🡕
;https://github.com/valinet
;q
;y Visit web site (https://www.valinet.ro) 🡕
;https://www.valinet.ro
;y E-mail author (valentingabrielradu@gmail.com) 🡕
;mailto:valentingabrielradu@gmail.com
;y Donate (using PayPal) 🡕
;https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher&currency_code=EUR
;y Frequently Asked Questions 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Frequently-asked-questions
;y Learn more managing these settings 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Settings-management
;u Import settings
;import
;u Export current settings
;export
;u Restore default settings
;reset
;f
;u Restart File Explorer (*)
;restart
;;u Restore default settings
;;reset
;;u About ExplorerPatcher
;;about

584
ExplorerPatcher/settings10.reg

@ -1,584 +0,0 @@
Windows Registry Editor Version 5.00
;M Settings
;q
;T Taskbar
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;y More taskbar options in the Settings app 🡕
;ms-settings:taskbar
;y Customize notification area icons 🡕
;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}
;y Customize system icons in the notification area 🡕
;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}\SystemIcons
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 4 Primary taskbar location on screen *
;x 3 Bottom (default)
;x 1 Top
;x 0 Left
;x 2 Right
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_TaskbarPosition"=dword:00000003
;c 4 Secondary taskbar(s) location on screen
;x 3 Bottom (default)
;x 1 Top
;x 0 Left
;x 2 Right
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_MMTaskbarPosition"=dword:00000003
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search]
;c 3 Search
;x 0 Hidden
;x 1 Show search icon
;x 2 Show search box
"SearchboxTaskbarMode"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b Show Cortana button
"ShowCortanaButton"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b Show Task view button
"ShowTaskViewButton"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b Show Desktop button
"TaskbarSD"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Automatically hide the taskbar
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_AutoHideTaskbar"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 2 Start button style
;x 0 Windows 10 (default)
;x 1 Windows 11
"OrbStyle"=dword:00000000
;c 5 Primary taskbar alignment
;x 0 At screen edge (default)
;x 1 Centered
;x 5 Centered, at screen edge when full
;x 3 Centered with Start button
;x 7 Centered with Start button, at screen edge when full
"OldTaskbarAl"=dword:00000000
;c 5 Secondary taskbar(s) alignment
;x 0 At screen edge (default)
;x 1 Centered
;x 5 Centered, at screen edge when full
;x 3 Centered with Start button
;x 7 Centered with Start button, at screen edge when full
"MMOldTaskbarAl"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 3 Combine taskbar icons on primary taskbar
;x 0 Always combine (default)
;x 1 Combine when taskbar is full
;x 2 Never combine
"TaskbarGlomLevel"=dword:00000000
;c 3 Combine taskbar icons on secondary taskbar(s)
;x 0 Always combine (default)
;x 1 Combine when taskbar is full
;x 2 Never combine
"MMTaskbarGlomLevel"=dword:00000000
;c 2 Taskbar icon size
;x 1 Small
;x 0 Large (default)
"TaskbarSmallIcons"=dword:00000000
;e
;e
;e
;e
;T System tray
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Skin taskbar and tray pop-up menus
"SkinMenus"=dword:00000001
;b Center tray icon pop-up menus
"CenterMenus"=dword:00000001
;b Flyout behavior for tray icon pop-up menus
"FlyoutMenus"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7]
;b Show touch keyboard button *
"TipbandDesiredVisibility"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;p 2
;b Apply Windows 11 style to system tray icons *
"SkinIcons"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b Show seconds in the clock
"ShowSecondsInSystemClock"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;a Choosing 'Open Network && Internet settings' when right clicking the
;c 3 network icon should open:
;x 0 Network section in the Settings app (default)
;x 1 Network and Sharing Center in Control Panel
;x 2 Network Connections in Control Panel
"ReplaceNetwork"=dword:00000000
;q
;t When clicking a system icon in the system tray, open:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Control Panel\Settings\Network]
;c 5 Network
;x 0 Windows 10 flyout (default)
;x 2 Windows 8 flyout
;x 1 Network section in the Settings app
;x 3 Network and Sharing Center in Control Panel
;x 4 Network Connections in Control Panel
"ReplaceVan"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC]
;c 2 Sound
;x 1 Windows 10 flyout (default)
;x 0 Windows 7 flyout
"EnableMtcUvc"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell]
;c 3 Clock
;x 0 Windows 10 flyout (default)
;x 1 Windows 7
;x 2 Action Center
"UseWin32TrayClockExperience"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell]
;c 2 Battery
;x 0 Windows 10 flyout (default)
;x 1 Windows 7
"UseWin32BatteryFlyout"=dword:00000000
;T File Explorer
;e For the settings marked with (**) to work in Open or Save file dialogs as well, register
;e this utility as shell extension using the option below.
;y Learn more 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Using-ExplorerPatcher-as-shell-extension
;q
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;i Use immersive menus when displaying Windows 10 context menus **
"DisableImmersiveContextMenu"=dword:00000000
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32]
;d Disable navigation bar **
@=""
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{1d64637d-31e9-4b06-9124-e83fb178ac6e}\TreatAs]
;d Disable modern search bar
@="{64bc32b5-4eec-4de7-972d-bd8bd0324537}"
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Hide search bar completely **
"HideExplorerSearchBar"=dword:00000000
;p 2
;b Mica effect on title bar
"MicaEffectOnTitlebar"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Register as shell extension
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_RegisterAsShellExtension"=dword:00000000
;T Start menu
;y More Start menu options in the Settings app 🡕
;ms-settings:personalization-start
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;z 2 Position on screen
;x 0 At screen edge (default)
;x 1 Center
"TaskbarAl"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 22 Maximum number of frequent apps to show
;x 0 None
;x 1 1
;x 2 2
;x 3 3
;x 4 4
;x 5 5
;x 6 6 (default)
;x 7 7
;x 8 8
;x 9 9
;x 10 10
;x 11 11
;x 12 12
;x 13 13
;x 14 14
;x 15 15
;x 16 16
;x 17 17
;x 18 18
;x 19 19
;x 20 20
;x 99999 Unlimited
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_Start_MaximumFrequentApps"=dword:00000006
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage]
;e When using multiple displays, open Start on this monitor when invoked using
;z 10 the keyboard
;x 1 Primary monitor (default)
;x 0 Monitor on which the cursor is on
;x 2 Monitor #2
;x 3 Monitor #3
;x 4 Monitor #4
;x 5 Monitor #5
;x 6 Monitor #6
;x 7 Monitor #7
;x 8 Monitor #8
;x 9 Monitor #9
"MonitorOverride"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 3 Corner preference
;x 1 Rounded corners, floating menu
;x 2 Rounded corners, docked menu
;x 0 Not rounded
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartUI_EnableRoundedCorners"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 3 Display mode
;x 0 Default
;x 1 Start menu
;x 2 Full screen Start
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_ForceStartSize"=dword:00000000
;z 3 App list
;x 0 Display
;x 3 Hide
;x 1 Disable
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_NoStartMenuMorePrograms"=dword:00000000
;t Some settings might not be available in older Windows 10 versions.
;T Window switcher
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
;z 3 Window switcher (Alt+Tab) style *
;x 0 Windows 10 (default)
;x 1 Windows NT
;x 2 Simple Window Switcher
"AltTabSettings"=dword:00000000
;t The following settings only apply to the Simple Window Switcher:
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;b Include desktop
"IncludeWallpaper"=dword:00000001
;b Always show on primary monitor
"PrimaryOnly"=dword:00000000
;b Show windows only from current monitor
"PerMonitor"=dword:00000000
;b Display only the most recent window (per application switcher)
"SwitcherIsPerApplication"=dword:00000000
;b %PLACEHOLDER_0001%
"NoPerApplicationList"=dword:00000000
;c 2 Theme
;x 0 Default
;x 1 Acrylic
"Theme"=dword:00000000
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MultitaskingView\AltTabViewHost]
;c 19 Opacity
;x 100 Opaque
;x 98 98 %
;x 96 96 %
;x 95 95 % (default)
;x 94 94 %
;x 92 92 %
;x 90 90 %
;x 85 85 %
;x 80 80 %
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
;x 50 50 %
;x 45 45 %
;x 40 40 %
;x 35 35 %
;x 30 30 %
"Grid_backgroundPercent"=dword:0000005F
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;c 3 Color scheme
;x 0 Follow system setting (default)
;x 1 Light
;x 2 Dark
"ColorScheme"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;c 20 Row height
;x 330 330 pt
;x 320 320 pt
;x 310 310 pt
;x 300 300 pt
;x 290 290 pt
;x 280 280 pt
;x 270 270 pt
;x 260 260 pt
;x 250 250 pt
;x 240 240 pt
;x 230 230 pt (default)
;x 220 220 pt
;x 210 210 pt
;x 200 200 pt
;x 190 190 pt
;x 180 180 pt
;x 170 170 pt
;x 160 160 pt
;x 150 150 pt
;x 140 140 pt
"RowHeight"=dword:000000e6
;c 10 Maximum width (percentage of screen width)
;x 100 100 % (not recommended)
;x 95 95 %
;x 90 90 %
;x 85 85 %
;x 80 80 % (default)
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
"MaxWidth"=dword:00000050
;c 10 Maximum height (percentage of screen height)
;x 100 100 % (not recommended)
;x 95 95 %
;x 90 90 %
;x 85 85 %
;x 80 80 % (default)
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
"MaxHeight"=dword:00000050
;c 11 Window padding
;x 50 50 pt
;x 45 45 pt
;x 40 40 pt (default)
;x 35 30 pt
;x 30 30 pt
;x 25 25 pt
;x 20 20 pt
;x 15 15 pt
;x 10 10 pt
;x 5 5 pt
;x 0 None
"MasterPadding"=dword:00000028
;c 11 Show delay
;x 0 None
;x 25 25 ms
;x 50 50 ms
;x 75 75 ms
;x 100 100 ms (default)
;x 125 125 ms
;x 150 150 ms
;x 200 200 ms
;x 300 300 ms
;x 400 400 ms
;x 500 500 ms
"ShowDelay"=dword:00000064
;q
;y Learn more about Simple Window Switcher 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Simple-Window-Switcher
;t Some settings might not be available in older Windows 10 versions.
;T Weather
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Show Weather on the taskbar
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_PeopleBand"=dword:00000000
;c 5 Layout
;x 0 Icon and description (default)
;x 3 Icon and temperature
;x 1 Icon only
;x 4 Temperature only
;x 5 Temperature and description
"WeatherViewMode"=dword:00000000
;c 3 Widget size
;x 0 Automatic (fit contents) (default)
;x 2 Automatic (fit contents) with threshold
;x 1 Fixed
"WeatherFixedSize"=dword:00000000
;c 2 Widget position
;x 0 Right / bottom (default)
;x 1 Left / top
"WeatherToLeft"=dword:00000000
;c 7 Update frequency
;x 60 Every minute
;x 300 Every 5 minutes
;x 900 Every 15 minutes
;x 1200 Every 20 minutes (default)
;x 1800 Every half an hour
;x 3600 Every hour
;x 7200 Every couple of hours
"WeatherContentUpdateMode"=dword:000004B0
;c 2 Temperature unit
;x 0 Celsius (default)
;x 1 Fahrenheit
"WeatherTemperatureUnit"=dword:00000000
;w Location
;Search City or Zip Code; the program looks up "weather in /* what you typed */" on Google. Leave blank for the default value (current location).
;Current location (default)
"WeatherLocation"=""
;;;c 2 Location accuracy
;;;x 0 Generic (based on the IP address) (default)
;;;x 1 Precise (geolocation)
;;"WeatherLocationType"=dword:00000000
;w Language
;Type the short code for the language you'd like the weather data to be displayed in. For example, try "en", "ro", "de", "fr" etc. Leave blank for the default value (language of the Windows OS).
;System language (default)
"WeatherLanguage"=""
;c 3 Color scheme
;x 0 Follow system setting (default)
;x 1 Light
;x 2 Dark
"WeatherTheme"=dword:00000000
;c 2 Icon pack
;x 0 Microsoft (default)
;x 1 Google
"WeatherIconPack"=dword:00000000
;c 2 Display widget contents
;x 0 On a single line (default)
;x 1 On 2 lines, if possible
"WeatherContentsMode"=dword:00000000
;c 17 Zoom
;x 25 25 %
;x 33 33 %
;x 50 50 %
;x 67 67 %
;x 75 75 %
;x 80 80 %
;x 90 90 %
;x 0 100 % (default)
;x 110 110 %
;x 125 125 %
;x 150 150 %
;x 175 175 %
;x 200 200 %
;x 250 250 %
;x 300 300 %
;x 400 400 %
;x 500 500 %
"WeatherZoomFactor"=dword:00000000
;q
;y Learn more about the Weather taskbar widget 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Weather
;t %WEATHERLASTUPDATETEXT%
;u Update weather now
;update_weather
;u Clear weather widget local data
;clear_data_weather
;T Other
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Remember last used section in this window
"LastSectionInProperties"=dword:00000000
;b Open clock flyout when pressing Win+C instead of Microsoft Teams *
"ClockFlyoutOnWinC"=dword:00000000
;b Show separators between taskbar toolbars *
"ToolbarSeparators"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b Show Command Prompt instead of PowerShell in Win+X menu *
"DontUsePowerShellOnWinX"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Remove shortcut key from program settings item in Win+X menu
"NoMenuAccelerator"=dword:00000000
;b Disable Office hotkeys (Ctrl+Alt+Shift+Windows key combinations) *
"DisableOfficeHotkeys"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 6 Default action in the Alt+F4 dialog on the desktop
;x 256 Switch user
;x 1 Sign out
;x 16 Sleep
;x 64 Hibernate
;x 2 Shut down (default)
;x 4 Restart
"Start_PowerButtonAction"=dword:00000002
;t Prevent the following Control Panel links from being redirected to the Settings app:
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b System / About page
"DoNotRedirectSystemToSettingsApp"=dword:00000000
;b Programs and Features
"DoNotRedirectProgramsAndFeaturesToSettingsApp"=dword:00000000
;b Adjust date/time
"DoNotRedirectDateAndTimeToSettingsApp"=dword:00000000
;b Customize notification icons
"DoNotRedirectNotificationIconsToSettingsApp"=dword:00000000
;T Updates
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 3 When File Explorer starts
;x 1 Notify about available updates (default)
;x 0 Prompt to install available updates
;x 2 Do not check for updates
"UpdatePolicy"=dword:00000001
;b Receive pre-release versions, if available (not recommended)
"UpdatePreferStaging"=dword:00000000
;b Suggest the latest version on the server, even if it's older (not recommended)
"UpdateAllowDowngrades"=dword:00000000
;t Update servers:
;w Releases
;Type a URL that serves resources adhering to GitHub's releases API. To learn how to configure your own update server, please consult the wiki.
;github.com/valinet/ExplorerPatcher/releases/latest
"UpdateURL"=""
;w Pre-releases
;Type a URL that serves resources adhering to GitHub's pre-releases API. To learn how to configure your own update server, please consult the wiki.
;api.github.com/repos/valinet/ExplorerPatcher/releases?per_page=1
"UpdateURLStaging"=""
;y Check for updates
;;;EP_CHECK_FOR_UPDATES
;y Update program and restart File Explorer
;;;EP_INSTALL_UPDATES
;y Read about changes in the latest releases 🡕
;https://github.com/valinet/ExplorerPatcher/blob/master/CHANGELOG.md
;y Learn more 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Configure-updates
;T Advanced
;e Only change these settings after reading the documentation about them.
;y Learn more 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/About-advanced-settings
;q
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Enable console
"AllocConsole"=dword:00000000
;b Dump memory leaks
"Memcheck"=dword:00000000
;b Double click taskbar to toggle auto-hide (only works when the taskbar is locked)
"TaskbarAutohideOnDoubleClick"=dword:00000000
[HKEY_CURRENT_USER\Control Panel\Desktop]
;b Show Windows build info on the desktop *
"PaintDesktopVersion"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Enable advanced mitigations for correct rendering using classic theme *
"ClassicThemeMitigations"=dword:00000000
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{1eeb5b5a-06fb-4732-96b3-975c0194eb39}\InprocServer32]
;d Enable SysListView32 for Explorer views *
@=""
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b Hide the program settings item ("Properties") from the taskbar context menu
"NoPropertiesInContextMenu"=dword:00000000
;b Enable symbols download *
"EnableSymbolDownload"=dword:00000001
;b Pinned items act as quick launch (don't group pinned items with active apps) *
"PinnedItemsActAsQuickLaunch"=dword:00000000
;b When the taskbar shows button labels, remove the extra gap around pinned items *
"RemoveExtraGapAroundPinnedItems"=dword:00000000
;T About
;e ExplorerPatcher
;e Version %VERSIONINFORMATIONSTRING%
;t © 2006-2022 VALINET Solutions SRL. All rights reserved.
;e
;e This project aims to enhance the working environment on Windows.
;e Proudly engineered by Valentin-Gabriel Radu.
;t Running on Windows 10, OS Build %OSVERSIONSTRING%
;y Visit project GitHub (https://github.com/valinet) 🡕
;https://github.com/valinet
;q
;y Visit web site (https://www.valinet.ro) 🡕
;https://www.valinet.ro
;y E-mail author (valentingabrielradu@gmail.com) 🡕
;mailto:valentingabrielradu@gmail.com
;y Donate (using PayPal) 🡕
;https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher&currency_code=EUR
;y Frequently Asked Questions 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Frequently-asked-questions
;y Learn more managing these settings 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Settings-management
;u Import settings
;import
;u Export current settings
;export
;u Restore default settings
;reset
;f
;u Restart File Explorer (*)
;restart
;;u Restore default settings
;;reset
;;u About ExplorerPatcher
;;about

1452
ExplorerPatcher/symbols.c

File diff suppressed because it is too large Load Diff

66
ExplorerPatcher/symbols.h

@ -1,25 +1,39 @@
#ifndef _H_SYMBOLS_H_ #ifndef _H_SYMBOLS_H_
#define _H_SYMBOLS_H_ #define _H_SYMBOLS_H_
#include <Windows.h> #include <Windows.h>
#ifndef __cplusplus
#define _LIBVALINET_INCLUDE_UNIVERSAL #define _LIBVALINET_INCLUDE_UNIVERSAL
#include <valinet/universal/toast/toast.h> #include <valinet/universal/toast/toast.h>
#include <valinet/utility/osversion.h> #include <valinet/utility/osversion.h>
#include <roapi.h> #include <roapi.h>
#include "utility.h" #include "utility.h"
#include "../ep_gui/resources/EPSharedResources.h"
#endif
#define EXIT_CODE_EXPLORER 1 #define EXIT_CODE_EXPLORER 1
#define EXPLORER_SB_NAME "explorer"
#define EXPLORER_SB_0 "ImmersiveTray::AttachWindowToTray"
#define EXPLORER_SB_1 "ImmersiveTray::RaiseWindow"
#define EXPLORER_SB_2 "CTaskBand_CreateInstance"
#define EXPLORER_SB_3 "HandleFirstTimeLegacy"
#define EXPLORER_SB_4 "SetColorPreferenceForLogonUI"
#define EXPLORER_SB_5 "TrayUI::_UpdatePearlSize"
#define EXPLORER_SB_CNT 6
#define EXPLORER_SB_VERSION 3
#define TWINUI_PCSHELL_SB_NAME "twinui.pcshell" #define TWINUI_PCSHELL_SB_NAME "twinui.pcshell"
#define TWINUI_PCSHELL_SB_0 "CImmersiveContextMenuOwnerDrawHelper::s_ContextMenuWndProc" #define TWINUI_PCSHELL_SB_0 "CImmersiveContextMenuOwnerDrawHelper::s_ContextMenuWndProc"
#define TWINUI_PCSHELL_SB_1 "CLauncherTipContextMenu::GetMenuItemsAsync" #define TWINUI_PCSHELL_SB_1 "ImmersiveContextMenuHelper::ApplyOwnerDrawToMenu"
#define TWINUI_PCSHELL_SB_2 "ImmersiveContextMenuHelper::ApplyOwnerDrawToMenu" #define TWINUI_PCSHELL_SB_2 "ImmersiveContextMenuHelper::RemoveOwnerDrawFromMenu"
#define TWINUI_PCSHELL_SB_3 "ImmersiveContextMenuHelper::RemoveOwnerDrawFromMenu" #define TWINUI_PCSHELL_SB_3 "CLauncherTipContextMenu::_ExecuteShutdownCommand"
#define TWINUI_PCSHELL_SB_4 "CLauncherTipContextMenu::_ExecuteShutdownCommand" #define TWINUI_PCSHELL_SB_4 "CLauncherTipContextMenu::_ExecuteCommand"
#define TWINUI_PCSHELL_SB_5 "CLauncherTipContextMenu::_ExecuteCommand" #define TWINUI_PCSHELL_SB_5 "CMultitaskingViewManager::_CreateXamlMTVHost"
#define TWINUI_PCSHELL_SB_6 "CLauncherTipContextMenu::ShowLauncherTipContextMenu" #define TWINUI_PCSHELL_SB_6 "CMultitaskingViewManager::_CreateDCompMTVHost"
#define TWINUI_PCSHELL_SB_7 "IsUndockedAssetAvailable" #define TWINUI_PCSHELL_SB_CNT 7
#define TWINUI_PCSHELL_SB_8 "winrt::Windows::Internal::Shell::implementation::MeetAndChatManager::OnMessage" // should be always last #define TWINUI_PCSHELL_SB_VERSION 2
#define TWINUI_PCSHELL_SB_CNT 9
#define STARTDOCKED_SB_NAME "StartDocked" #define STARTDOCKED_SB_NAME "StartDocked"
#define STARTDOCKED_SB_0 "StartDocked::LauncherFrame::ShowAllApps" // UNUSED #define STARTDOCKED_SB_0 "StartDocked::LauncherFrame::ShowAllApps" // UNUSED
#define STARTDOCKED_SB_1 "StartDocked::LauncherFrame::ShowAllApps" #define STARTDOCKED_SB_1 "StartDocked::LauncherFrame::ShowAllApps"
@ -27,26 +41,53 @@
#define STARTDOCKED_SB_3 "StartDocked::SystemListPolicyProvider::GetMaximumFrequentApps" #define STARTDOCKED_SB_3 "StartDocked::SystemListPolicyProvider::GetMaximumFrequentApps"
#define STARTDOCKED_SB_4 "StartDocked::StartSizingFrame::StartSizingFrame" #define STARTDOCKED_SB_4 "StartDocked::StartSizingFrame::StartSizingFrame"
#define STARTDOCKED_SB_CNT 5 #define STARTDOCKED_SB_CNT 5
#define STARTDOCKED_SB_VERSION 1
#define STARTUI_SB_NAME "StartUI" #define STARTUI_SB_NAME "StartUI"
#define STARTUI_SB_0 "StartUI::SystemListPolicyProvider::GetMaximumFrequentApps" #define STARTUI_SB_0 "StartUI::SystemListPolicyProvider::GetMaximumFrequentApps"
#define STARTUI_SB_CNT 1 #define STARTUI_SB_CNT 1
#define STARTUI_SB_VERSION 1
#ifdef __cplusplus
extern "C" {
#endif
#pragma pack(push, 1) #pragma pack(push, 1)
typedef struct symbols_addr typedef struct symbols_addr
{ {
DWORD explorer_PTRS[EXPLORER_SB_CNT];
DWORD twinui_pcshell_PTRS[TWINUI_PCSHELL_SB_CNT]; DWORD twinui_pcshell_PTRS[TWINUI_PCSHELL_SB_CNT];
DWORD startdocked_PTRS[STARTDOCKED_SB_CNT]; DWORD startdocked_PTRS[STARTDOCKED_SB_CNT];
DWORD startui_PTRS[STARTUI_SB_CNT]; DWORD startui_PTRS[STARTUI_SB_CNT];
} symbols_addr; } symbols_addr;
#pragma pack(pop) #pragma pack(pop)
typedef struct _LoadSymbolsResult
{
BOOL bSuccess : 1;
BOOL bNeedToDownloadExplorerSymbols : 1;
BOOL bNeedToDownloadTwinuiPcshellSymbols : 1;
BOOL bNeedToDownloadStartDockedSymbols : 1;
BOOL bNeedToDownloadStartUISymbols : 1;
} LoadSymbolsResult;
inline BOOL NeedToDownloadSymbols(const LoadSymbolsResult* pLoadResult)
{
return pLoadResult->bNeedToDownloadExplorerSymbols
|| pLoadResult->bNeedToDownloadTwinuiPcshellSymbols
|| pLoadResult->bNeedToDownloadStartDockedSymbols
|| pLoadResult->bNeedToDownloadStartUISymbols;
}
typedef struct _DownloadSymbolsParams typedef struct _DownloadSymbolsParams
{ {
HMODULE hModule; HMODULE hModule;
BOOL bVerbose; BOOL bVerbose;
LoadSymbolsResult loadResult;
} DownloadSymbolsParams; } DownloadSymbolsParams;
DWORD DownloadSymbols(DownloadSymbolsParams* params); DWORD DownloadSymbols(DownloadSymbolsParams* params);
BOOL LoadSymbols(symbols_addr* symbols_PTRS, HMODULE hModule); LoadSymbolsResult LoadSymbols(symbols_addr* symbols_PTRS);
inline BOOL IsBuild(RTL_OSVERSIONINFOW rovi, DWORD32 ubr, DWORD BuildNumber, DWORD BuildMinor) inline BOOL IsBuild(RTL_OSVERSIONINFOW rovi, DWORD32 ubr, DWORD BuildNumber, DWORD BuildMinor)
{ {
@ -55,4 +96,9 @@ inline BOOL IsBuild(RTL_OSVERSIONINFOW rovi, DWORD32 ubr, DWORD BuildNumber, DWO
rovi.dwBuildNumber == BuildNumber && rovi.dwBuildNumber == BuildNumber &&
ubr == BuildMinor); ubr == BuildMinor);
} }
#ifdef __cplusplus
}
#endif
#endif #endif

1181
ExplorerPatcher/updates.c

File diff suppressed because it is too large Load Diff

1437
ExplorerPatcher/updates.cpp

File diff suppressed because it is too large Load Diff

32
ExplorerPatcher/updates.h

@ -6,6 +6,11 @@
#pragma comment(lib, "Wininet.lib") #pragma comment(lib, "Wininet.lib")
#include <shlobj_core.h> #include <shlobj_core.h>
#include "utility.h" #include "utility.h"
#include "../ep_gui/resources/EPSharedResources.h"
#ifdef __cplusplus
extern "C" {
#endif
extern HMODULE hModule; extern HMODULE hModule;
@ -19,6 +24,7 @@ extern HMODULE hModule;
#define UPDATES_OP_DEFAULT 0 #define UPDATES_OP_DEFAULT 0
#define UPDATES_OP_CHECK 1 #define UPDATES_OP_CHECK 1
#define UPDATES_OP_INSTALL 2 #define UPDATES_OP_INSTALL 2
#define UPDATES_OP_INSTALL_NO_CONFIRM 3
#define UPDATES_USER_AGENT "ExplorerPatcher" #define UPDATES_USER_AGENT "ExplorerPatcher"
#define UPDATES_FORM_HEADERS "Content-Type: text/plain;\r\n" #define UPDATES_FORM_HEADERS "Content-Type: text/plain;\r\n"
@ -30,24 +36,10 @@ extern HMODULE hModule;
#define UPDATES_RELEASE_INFO_URL_STABLE "https://github.com/valinet/ExplorerPatcher/releases/latest" #define UPDATES_RELEASE_INFO_URL_STABLE "https://github.com/valinet/ExplorerPatcher/releases/latest"
#define UPDATES_RELEASE_INFO_URL_STAGING "https://api.github.com/repos/valinet/ExplorerPatcher/releases?per_page=1" #define UPDATES_RELEASE_INFO_URL_STAGING "https://api.github.com/repos/valinet/ExplorerPatcher/releases?per_page=1"
typedef struct IsUpdateAvailableParameters DWORD CheckForUpdatesThread(LPVOID params);
{
HINTERNET hInternet; #ifdef __cplusplus
HANDLE hEvent; }
}; #endif
BOOL IsUpdatePolicy(LPCWSTR wszDataStore, DWORD dwUpdatePolicy);
BOOL ShowUpdateSuccessNotification(
HMODULE hModule,
__x_ABI_CWindows_CUI_CNotifications_CIToastNotifier* notifier,
__x_ABI_CWindows_CUI_CNotifications_CIToastNotificationFactory* notifFactory,
__x_ABI_CWindows_CUI_CNotifications_CIToastNotification** toast
);
BOOL InstallUpdatesIfAvailable(
HMODULE hModule,
__x_ABI_CWindows_CUI_CNotifications_CIToastNotifier* notifier,
__x_ABI_CWindows_CUI_CNotifications_CIToastNotificationFactory* notifFactory,
__x_ABI_CWindows_CUI_CNotifications_CIToastNotification** toast,
DWORD dwOperation, DWORD bAllocConsole, DWORD dwUpdatePolicy
);
#endif #endif

544
ExplorerPatcher/utility.c

@ -5,105 +5,6 @@
RTL_OSVERSIONINFOW global_rovi; RTL_OSVERSIONINFOW global_rovi;
DWORD32 global_ubr; DWORD32 global_ubr;
#pragma region "Weird stuff"
INT64 STDMETHODCALLTYPE nimpl4_1(INT64 a1, DWORD* a2)
{
*a2 = 1;
return 0;
}
INT64 STDMETHODCALLTYPE nimpl4_0(INT64 a1, DWORD* a2)
{
*a2 = 0;
return 0;
}
__int64 STDMETHODCALLTYPE nimpl2(__int64 a1, uintptr_t* a2)
{
__int64 v2; // rax
v2 = a1 + 8;
if (!a1)
v2 = 0i64;
*a2 = v2;
return 0i64;
}
ULONG STDMETHODCALLTYPE nimpl3()
{
return 1;
}
HRESULT STDMETHODCALLTYPE nimpl()
{
return E_NOTIMPL;
}
HRESULT STDMETHODCALLTYPE nimpl1(__int64 a1, uintptr_t* a2, uintptr_t* a3)
{
__int64 v4 = a1; // rcx
if (*a2 != 0x5FADCA5C34A95314i64 || a2[1] != 0xC1661118901A7CAEui64)
return E_NOTIMPL;
*a3 = v4;
return S_OK;
}
HRESULT STDMETHODCALLTYPE nimpl1_2(__int64 a1, uintptr_t* a2, uintptr_t* a3)
{
__int64 v4 = a1 - sizeof(__int64); // rcx
if (*a2 != 0x5FADCA5C34A95314i64 || a2[1] != 0xC1661118901A7CAEui64)
return E_NOTIMPL;
*a3 = v4;
return S_OK;
}
HRESULT STDMETHODCALLTYPE nimpl1_3(__int64 a1, uintptr_t* a2, uintptr_t* a3)
{
__int64 v4 = a1 - 2 * sizeof(__int64); // rcx
if (*a2 != 0x5FADCA5C34A95314i64 || a2[1] != 0xC1661118901A7CAEui64)
return E_NOTIMPL;
*a3 = v4;
return S_OK;
}
__int64 STDMETHODCALLTYPE nimpl4(__int64 a1, __int64 a2, __int64 a3, BYTE* a4)
{
*a4 = 0;
return 0i64;
}
const IActivationFactoryVtbl _IActivationFactoryVtbl = {
.QueryInterface = nimpl1,
.AddRef = nimpl3,
.Release = nimpl3,
.GetIids = nimpl,
.GetRuntimeClassName = nimpl,
.GetTrustLevel = nimpl,
.ActivateInstance = nimpl2
};
const IActivationFactoryVtbl _IActivationFactoryVtbl2 = {
.QueryInterface = nimpl1_2,
.AddRef = nimpl3,
.Release = nimpl3,
.GetIids = nimpl,
.GetRuntimeClassName = nimpl,
.GetTrustLevel = nimpl,
.ActivateInstance = nimpl
};
const IActivationFactoryVtbl _IActivationFactoryVtbl3 = {
.QueryInterface = nimpl1_3,
.AddRef = nimpl3,
.Release = nimpl3,
.GetIids = nimpl,
.GetRuntimeClassName = nimpl,
.GetTrustLevel = nimpl,
.ActivateInstance = nimpl4
};
const IActivationFactoryAA XamlExtensionsFactory = {
.lpVtbl = &_IActivationFactoryVtbl,
.lpVtbl2 = &_IActivationFactoryVtbl2,
.lpVtbl3 = &_IActivationFactoryVtbl3
};
#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",
@ -112,6 +13,7 @@ void printf_guid(GUID guid)
guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]); guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]);
} }
#ifdef _DEBUG
LRESULT CALLBACK BalloonWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK BalloonWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{ {
if (msg == WM_CREATE) if (msg == WM_CREATE)
@ -141,7 +43,7 @@ LRESULT CALLBACK BalloonWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara
return 0; return 0;
} }
__declspec(dllexport) CALLBACK ZZTestBalloon(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow) __declspec(dllexport) int CALLBACK ZZTestBalloon(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
{ {
TCHAR* lpwszCmdLine = calloc((strlen(lpszCmdLine) + 1), sizeof(TCHAR)); TCHAR* lpwszCmdLine = calloc((strlen(lpszCmdLine) + 1), sizeof(TCHAR));
if (!lpwszCmdLine) exit(0); if (!lpwszCmdLine) exit(0);
@ -177,6 +79,8 @@ __declspec(dllexport) CALLBACK ZZTestBalloon(HWND hWnd, HINSTANCE hInstance, LPS
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);
} }
return 0;
} }
const wchar_t TestToastXML[] = const wchar_t TestToastXML[] =
@ -190,7 +94,7 @@ L" </binding>\r\n"
L" </visual>\r\n" L" </visual>\r\n"
L" <audio src=\"ms-winsoundevent:Notification.Default\" loop=\"false\" silent=\"false\"/>\r\n" L" <audio src=\"ms-winsoundevent:Notification.Default\" loop=\"false\" silent=\"false\"/>\r\n"
L"</toast>\r\n"; L"</toast>\r\n";
__declspec(dllexport) CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow) __declspec(dllexport) int CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
{ {
TCHAR* lpwszCmdLine = calloc((strlen(lpszCmdLine) + 1), sizeof(TCHAR)); TCHAR* lpwszCmdLine = calloc((strlen(lpszCmdLine) + 1), sizeof(TCHAR));
if (!lpwszCmdLine) exit(0); if (!lpwszCmdLine) exit(0);
@ -230,9 +134,12 @@ __declspec(dllexport) CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, LPSTR
free(buffer); free(buffer);
} }
free(lpwszCmdLine); free(lpwszCmdLine);
return 0;
} }
#endif
__declspec(dllexport) CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow) #ifndef EP_BUILD_SETUP
__declspec(dllexport) int CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
{ {
Sleep(100); Sleep(100);
TCHAR wszExplorerPath[MAX_PATH + 1]; TCHAR wszExplorerPath[MAX_PATH + 1];
@ -261,19 +168,23 @@ __declspec(dllexport) CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance,
), ),
0 0
); );
return 0;
} }
__declspec(dllexport) CALLBACK ZZLaunchExplorerDelayed(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow) __declspec(dllexport) int CALLBACK ZZLaunchExplorerDelayed(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
{ {
Sleep(2000); Sleep(2000);
ZZLaunchExplorer(hWnd, hInstance, lpszCmdLine, nCmdShow); ZZLaunchExplorer(hWnd, hInstance, lpszCmdLine, nCmdShow);
return 0;
} }
__declspec(dllexport) CALLBACK ZZRestartExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow) __declspec(dllexport) int CALLBACK ZZRestartExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow)
{ {
BeginExplorerRestart(); BeginExplorerRestart(NULL);
FinishExplorerRestart(); FinishExplorerRestart();
return 0;
} }
#endif
void* ReadFromFile(wchar_t* wszFileName, DWORD* dwSize) void* ReadFromFile(wchar_t* wszFileName, DWORD* dwSize)
{ {
@ -441,34 +352,48 @@ int ComputeFileHash2(HMODULE hModule, LPCWSTR filename, LPSTR hash, DWORD dwHash
return ERROR_SUCCESS; return ERROR_SUCCESS;
} }
void GetHardcodedHash(LPCWSTR wszPath, LPSTR hash, DWORD dwHash)
{
HANDLE hFile = CreateFileW(wszPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
if (hFile == INVALID_HANDLE_VALUE)
{
return 1;
}
HANDLE hFileMapping = CreateFileMappingW(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
if (hFileMapping == 0)
{
CloseHandle(hFile);
return 2;
}
char* lpFileBase = MapViewOfFile(hFileMapping, FILE_MAP_READ, 0, 0, 0);
if (lpFileBase == 0)
{
CloseHandle(hFileMapping);
CloseHandle(hFile);
return 3;
}
memcpy_s(hash, MIN(32, dwHash), lpFileBase + DOSMODE_OFFSET, 32);
UnmapViewOfFile(lpFileBase);
CloseHandle(hFileMapping);
CloseHandle(hFile);
}
void LaunchPropertiesGUI(HMODULE hModule) void LaunchPropertiesGUI(HMODULE hModule)
{ {
//CreateThread(0, 0, ZZGUI, 0, 0, 0); //CreateThread(0, 0, ZZGUI, 0, 0, 0);
wchar_t wszPath[MAX_PATH * 2]; wchar_t wszPath[MAX_PATH * 2];
ZeroMemory( ZeroMemory(wszPath, ARRAYSIZE(wszPath));
wszPath,
(MAX_PATH * 2) * sizeof(wchar_t)
);
wszPath[0] = '\"'; wszPath[0] = '\"';
GetSystemDirectoryW( GetSystemDirectoryW(wszPath + 1, MAX_PATH);
wszPath + 1, wcscat_s(wszPath, ARRAYSIZE(wszPath), L"\\rundll32.exe\" \"");
MAX_PATH SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, wszPath + wcslen(wszPath));
); wcscat_s(wszPath, ARRAYSIZE(wszPath), _T(APP_RELATIVE_PATH) L"\\ep_gui.dll");
wcscat_s( wcscat_s(wszPath, ARRAYSIZE(wszPath), L"\",ZZGUI");
wszPath,
MAX_PATH * 2,
L"\\rundll32.exe\" \""
);
GetModuleFileNameW(
hModule,
wszPath + wcslen(wszPath),
MAX_PATH
);
wcscat_s(
wszPath,
MAX_PATH * 2,
L"\",ZZGUI"
);
wprintf(L"Launching : %s\n", wszPath); wprintf(L"Launching : %s\n", wszPath);
STARTUPINFO si; STARTUPINFO si;
ZeroMemory(&si, sizeof(STARTUPINFO)); ZeroMemory(&si, sizeof(STARTUPINFO));
@ -700,15 +625,7 @@ LSTATUS RegisterDWMService(DWORD dwDesiredState, DWORD dwOverride)
WCHAR wszRundll32[MAX_PATH]; WCHAR wszRundll32[MAX_PATH];
SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, wszRundll32); SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, wszRundll32);
wcscat_s(wszRundll32, MAX_PATH, _T(APP_RELATIVE_PATH)); wcscat_s(wszRundll32, MAX_PATH, _T(APP_RELATIVE_PATH));
wcscat_s(wszRundll32, MAX_PATH, L"\\ep_dwm.exe"); wcscat_s(wszRundll32, MAX_PATH, L"\\ep_dwm_svc.exe");
WCHAR wszEP[MAX_PATH];
GetWindowsDirectoryW(wszEP, MAX_PATH);
wcscat_s(wszEP, MAX_PATH, L"\\dxgi.dll");
WCHAR wszTaskkill[MAX_PATH];
GetSystemDirectoryW(wszTaskkill, MAX_PATH);
wcscat_s(wszTaskkill, MAX_PATH, L"\\taskkill.exe");
WCHAR wszArgumentsRegister[MAX_PATH * 10]; WCHAR wszArgumentsRegister[MAX_PATH * 10];
swprintf_s( swprintf_s(
@ -749,34 +666,20 @@ LSTATUS RegisterDWMService(DWORD dwDesiredState, DWORD dwOverride)
HANDLE h_exists = CreateEventW(NULL, FALSE, FALSE, _T(EP_DWM_EVENTNAME)); HANDLE h_exists = CreateEventW(NULL, FALSE, FALSE, _T(EP_DWM_EVENTNAME));
if (h_exists) if (h_exists)
{ {
if (GetLastError() == ERROR_ALREADY_EXISTS) bAreRoundedCornersDisabled = GetLastError() == ERROR_ALREADY_EXISTS;
{
bAreRoundedCornersDisabled = TRUE;
}
else
{
bAreRoundedCornersDisabled = FALSE;
}
CloseHandle(h_exists); CloseHandle(h_exists);
} }
else else
{ {
if (GetLastError() == ERROR_ACCESS_DENIED) bAreRoundedCornersDisabled = GetLastError() == ERROR_ACCESS_DENIED;
{
bAreRoundedCornersDisabled = TRUE;
}
else
{
bAreRoundedCornersDisabled = FALSE;
}
} }
if ((bAreRoundedCornersDisabled && dwDesiredState) || (!bAreRoundedCornersDisabled && !dwDesiredState)) if ((bAreRoundedCornersDisabled && dwDesiredState) || (!bAreRoundedCornersDisabled && !dwDesiredState))
{ {
return FALSE; return FALSE;
} }
} }
SHELLEXECUTEINFO ShExecInfo = { 0 }; SHELLEXECUTEINFOW ShExecInfo = { 0 };
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO); ShExecInfo.cbSize = sizeof(ShExecInfo);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS; ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShExecInfo.hwnd = NULL; ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = L"runas"; ShExecInfo.lpVerb = L"runas";
@ -795,6 +698,7 @@ LSTATUS RegisterDWMService(DWORD dwDesiredState, DWORD dwOverride)
return TRUE; return TRUE;
} }
#ifndef EP_BUILD_SETUP
char* StrReplaceAllA(const char* s, const char* oldW, const char* newW, int* dwNewSize) char* StrReplaceAllA(const char* s, const char* oldW, const char* newW, int* dwNewSize)
{ {
char* result; char* result;
@ -1216,6 +1120,7 @@ HRESULT InputBox(BOOL bPassword, HWND hWnd, LPCWSTR wszPrompt, LPCWSTR wszTitle,
return hr; return hr;
} }
#endif
UINT PleaseWaitTimeout = 0; UINT PleaseWaitTimeout = 0;
HHOOK PleaseWaitHook = NULL; HHOOK PleaseWaitHook = NULL;
@ -1406,8 +1311,7 @@ BOOL DownloadFile(LPCWSTR wszURL, DWORD dwSize, LPCWSTR wszPath)
exe_buffer = calloc(dwSize, sizeof(char)); exe_buffer = calloc(dwSize, sizeof(char));
if (exe_buffer) if (exe_buffer)
{ {
BOOL bRet = FALSE; if (InternetReadFile(
if (bRet = InternetReadFile(
hConnect, hConnect,
exe_buffer, exe_buffer,
dwSize - 1, dwSize - 1,
@ -1418,7 +1322,7 @@ BOOL DownloadFile(LPCWSTR wszURL, DWORD dwSize, LPCWSTR wszPath)
_wfopen_s(&f, wszPath, L"wb"); _wfopen_s(&f, wszPath, L"wb");
if (f) if (f)
{ {
fwrite(exe_buffer, 1, dwRead, f); bOK = fwrite(exe_buffer, 1, dwRead, f) == dwRead;
fclose(f); fclose(f);
} }
} }
@ -1466,3 +1370,327 @@ BOOL IsConnectedToInternet()
} }
return connectedStatus; return connectedStatus;
} }
BOOL DoesOSBuildSupportSpotlight()
{
return (global_rovi.dwBuildNumber == 22000 && global_ubr >= 706) || (global_rovi.dwBuildNumber >= 22598);
}
BOOL IsSpotlightEnabled()
{
HKEY hKey = NULL;
BOOL bRet = RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Classes\\CLSID\\{2CC5CA98-6485-489A-920E-B3E88A6CCCE3}", 0, KEY_READ, &hKey) == ERROR_SUCCESS;
if (bRet) RegCloseKey(hKey);
return bRet;
}
const int spop_insertmenu_ops[] = { SPOP_INSERTMENU_OPEN, SPOP_INSERTMENU_NEXTPIC, 0, SPOP_INSERTMENU_LIKE, SPOP_INSERTMENU_DISLIKE };
void SpotlightHelper(DWORD dwOp, HWND hWnd, HMENU hMenu, LPPOINT pPt)
{
HRESULT hr = S_OK;
LPITEMIDLIST pidl = NULL;
SFGAOF sfgao = 0;
if (SUCCEEDED(hr = SHParseDisplayName(L"::{2CC5CA98-6485-489A-920E-B3E88A6CCCE3}", NULL, &pidl, 0, &sfgao)))
{
IShellFolder* psf = NULL;
LPCITEMIDLIST pidlChild;
if (SUCCEEDED(hr = SHBindToParent(pidl, &IID_IShellFolder, (void**)&psf, &pidlChild)))
{
IContextMenu* pcm = NULL;
if (SUCCEEDED(hr = psf->lpVtbl->GetUIObjectOf(psf, hWnd, 1, &pidlChild, &IID_IContextMenu, NULL, &pcm)))
{
HMENU hMenu2 = CreatePopupMenu();
if (hMenu2)
{
if (SUCCEEDED(hr = pcm->lpVtbl->QueryContextMenu(pcm, hMenu2, 0, SCRATCH_QCM_FIRST, SCRATCH_QCM_LAST, CMF_NORMAL)))
{
if (dwOp == SPOP_OPENMENU)
{
int iCmd = TrackPopupMenuEx(hMenu2, TPM_RETURNCMD, pPt->x, pPt->y, hWnd, NULL);
if (iCmd > 0)
{
CMINVOKECOMMANDINFOEX info = { 0 };
info.cbSize = sizeof(info);
info.fMask = CMIC_MASK_UNICODE | CMIC_MASK_PTINVOKE;
info.hwnd = hWnd;
info.lpVerb = MAKEINTRESOURCEA(iCmd - SCRATCH_QCM_FIRST);
info.lpVerbW = MAKEINTRESOURCEW(iCmd - SCRATCH_QCM_FIRST);
info.nShow = SW_SHOWNORMAL;
info.ptInvoke = *pPt;
pcm->lpVtbl->InvokeCommand(pcm, &info);
}
}
else if (!(dwOp & ~SPOP_INSERTMENU_ALL))
{
MENUITEMINFOW mii;
int i = ARRAYSIZE(spop_insertmenu_ops) - 1;
while (1)
{
if (i == -1 ? ((dwOp & SPOP_INSERTMENU_INFOTIP1) || (dwOp & SPOP_INSERTMENU_INFOTIP2)) : (dwOp & spop_insertmenu_ops[i]))
{
mii.cbSize = sizeof(MENUITEMINFOW);
mii.fMask = MIIM_FTYPE | MIIM_STRING;
mii.cch = 0;
mii.dwTypeData = NULL;
if (i <= 0 ?
(i == 0 ?
!RegQueryValueW(HKEY_CURRENT_USER, L"Software\\Classes\\CLSID\\{2cc5ca98-6485-489a-920e-b3e88a6ccce3}", NULL, &mii.cch) :
!RegGetValueW(HKEY_CURRENT_USER, L"Software\\Classes\\CLSID\\{2cc5ca98-6485-489a-920e-b3e88a6ccce3}", L"InfoTip", RRF_RT_REG_SZ, NULL, NULL, &mii.cch)
) :
GetMenuItemInfoW(hMenu2, i, TRUE, &mii))
{
WCHAR* buf = malloc(++mii.cch * sizeof(WCHAR));
if (buf)
{
mii.dwTypeData = buf;
if (i <= 0 ?
(i == 0 ?
!RegQueryValueW(HKEY_CURRENT_USER, L"Software\\Classes\\CLSID\\{2cc5ca98-6485-489a-920e-b3e88a6ccce3}", mii.dwTypeData, &mii.cch) :
!RegGetValueW(HKEY_CURRENT_USER, L"Software\\Classes\\CLSID\\{2cc5ca98-6485-489a-920e-b3e88a6ccce3}", L"InfoTip", RRF_RT_REG_SZ, NULL, mii.dwTypeData, &mii.cch)
) :
GetMenuItemInfoW(hMenu2, i, TRUE, &mii))
{
if (i == -1)
{
WCHAR* pCInit = mii.dwTypeData;
WCHAR* pC = wcschr(mii.dwTypeData, L'\r');
if (pC)
{
pC[0] = 0;
pC++;
WCHAR* pC2 = wcschr(pC, L'\r');
if (pC2)
{
pC2[0] = 0;
}
mii.dwTypeData = pC;
mii.fMask = MIIM_ID | MIIM_STRING | MIIM_DATA | MIIM_STATE;
mii.wID = 3999 + i - 1;
mii.dwItemData = SPOP_CLICKMENU_FIRST + i - 1;
mii.fType = MFT_STRING;
mii.fState = MFS_DISABLED;
if (dwOp & SPOP_INSERTMENU_INFOTIP2)
{
InsertMenuItemW(hMenu, 3, TRUE, &mii);
}
mii.dwTypeData = pCInit;
}
}
mii.fMask = MIIM_ID | MIIM_STRING | MIIM_DATA | (i == -1 ? MIIM_STATE : 0);
mii.wID = 3999 + i;
mii.dwItemData = SPOP_CLICKMENU_FIRST + i;
mii.fType = MFT_STRING;
if (i == -1) mii.fState = MFS_DISABLED;
if (i != -1 || (i == -1 && (dwOp & SPOP_INSERTMENU_INFOTIP1)))
{
InsertMenuItemW(hMenu, 3, TRUE, &mii);
}
}
free(buf);
}
}
}
i--;
if (i < -1) break;
}
mii.fMask = MIIM_FTYPE | MIIM_DATA;
mii.dwItemData = 0;
mii.fType = MFT_SEPARATOR;
InsertMenuItemW(hMenu, 3, TRUE, &mii);
}
else if (dwOp >= SPOP_CLICKMENU_FIRST && dwOp <= SPOP_CLICKMENU_LAST)
{
MENUITEMINFOW mii;
mii.cbSize = sizeof(MENUITEMINFOW);
mii.fMask = MIIM_ID;
if (GetMenuItemInfoW(hMenu2, dwOp - SPOP_CLICKMENU_FIRST, TRUE, &mii))
{
CMINVOKECOMMANDINFOEX info = { 0 };
info.cbSize = sizeof(info);
info.fMask = CMIC_MASK_UNICODE;
info.hwnd = hWnd;
info.lpVerb = MAKEINTRESOURCEA(mii.wID - SCRATCH_QCM_FIRST);
info.lpVerbW = MAKEINTRESOURCEW(mii.wID - SCRATCH_QCM_FIRST);
info.nShow = SW_SHOWNORMAL;
pcm->lpVtbl->InvokeCommand(pcm, &info);
}
}
}
DestroyMenu(hMenu2);
}
pcm->lpVtbl->Release(pcm);
}
psf->lpVtbl->Release(psf);
}
CoTaskMemFree(pidl);
}
}
BOOL ExtractMonitorByIndex(HMONITOR hMonitor, HDC hDC, LPRECT lpRect, MonitorOverrideData* mod)
{
POINT pt; pt.x = 0; pt.y = 0;
if (MonitorFromPoint(pt, MONITOR_DEFAULTTONULL) == hMonitor)
{
return TRUE;
}
if (mod->cbIndex == mod->dwIndex)
{
mod->hMonitor = hMonitor;
return FALSE;
}
mod->cbIndex++;
return TRUE;
}
HRESULT SHRegGetBOOLWithREGSAM(HKEY key, LPCWSTR subKey, LPCWSTR value, REGSAM regSam, BOOL* data)
{
DWORD dwType = REG_NONE;
DWORD dwData;
DWORD cbData = 4;
LSTATUS lRes = RegGetValueW(
key,
subKey,
value,
((regSam & 0x100) << 8) | RRF_RT_REG_DWORD | RRF_RT_REG_SZ | RRF_NOEXPAND,
&dwType,
&dwData,
&cbData
);
if (lRes != ERROR_SUCCESS)
{
if (lRes == ERROR_MORE_DATA)
return HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
if (lRes > 0)
return HRESULT_FROM_WIN32(lRes);
return lRes;
}
if (dwType == REG_DWORD)
{
if (dwData > 1)
return HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
*data = dwData == 1;
}
else
{
if (cbData != 4 || (WCHAR)dwData != L'0' && (WCHAR)dwData != L'1')
return HRESULT_FROM_WIN32(ERROR_INVALID_DATA);
*data = (WCHAR)dwData == L'1';
}
return S_OK;
}
HRESULT SHRegGetDWORD(HKEY hkey, const WCHAR* pwszSubKey, const WCHAR* pwszValue, DWORD* pdwData)
{
DWORD dwSize = sizeof(DWORD);
LSTATUS lres = RegGetValueW(hkey, pwszSubKey, pwszValue, RRF_RT_REG_DWORD, NULL, pdwData, &dwSize);
return HRESULT_FROM_WIN32(lres);
}
#ifdef WITH_MAIN_PATCHER
// https://learn.microsoft.com/en-us/windows/uwp/communication/sharing-named-objects
// https://learn.microsoft.com/en-us/windows/win32/api/securityappcontainer/nf-securityappcontainer-getappcontainernamedobjectpath#examples
BOOL GetLogonSid(PSID* ppsid)
{
BOOL bSuccess = FALSE;
HANDLE hToken = INVALID_HANDLE_VALUE;
DWORD dwLength = 0;
PTOKEN_GROUPS ptg = NULL;
if (NULL == ppsid)
goto Cleanup;
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken))
goto Cleanup;
if (!GetTokenInformation(hToken, TokenLogonSid, (LPVOID)ptg, 0, &dwLength))
{
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER)
goto Cleanup;
ptg = (PTOKEN_GROUPS)calloc(1, dwLength);
}
if (ptg == NULL)
goto Cleanup;
if (!GetTokenInformation(hToken, TokenLogonSid, (LPVOID)ptg, dwLength, &dwLength) || ptg->GroupCount != 1)
goto Cleanup;
dwLength = GetLengthSid(ptg->Groups[0].Sid);
*ppsid = (PSID)calloc(1, dwLength);
if (*ppsid == NULL)
goto Cleanup;
if (!CopySid(dwLength, *ppsid, ptg->Groups[0].Sid))
{
free((LPVOID)*ppsid);
goto Cleanup;
}
bSuccess = TRUE;
Cleanup:
if (ptg != NULL)
free((LPVOID)ptg);
return bSuccess;
}
// https://learn.microsoft.com/en-us/windows/uwp/communication/sharing-named-objects
// https://learn.microsoft.com/en-us/windows/win32/api/securityappcontainer/nf-securityappcontainer-getappcontainernamedobjectpath#examples
BOOL PrepareSecurityDescriptor(PSID pMainSid, DWORD dwMainPermissions, PSID pSecondarySid, DWORD dwSecondayPermissions, PSECURITY_DESCRIPTOR* ppSD)
{
BOOL bSuccess = FALSE;
DWORD dwRes = ERROR_SUCCESS;
PACL pACL = NULL;
PSECURITY_DESCRIPTOR pSD = NULL;
EXPLICIT_ACCESS ea[2];
if (pMainSid == NULL || pSecondarySid == NULL)
goto Cleanup;
ZeroMemory(&ea, 2 * sizeof(EXPLICIT_ACCESS));
ea[0].grfAccessPermissions = dwMainPermissions;
ea[0].grfAccessMode = SET_ACCESS;
ea[0].grfInheritance = NO_INHERITANCE;
ea[0].Trustee.TrusteeForm = TRUSTEE_IS_SID;
ea[0].Trustee.TrusteeType = TRUSTEE_IS_USER;
ea[0].Trustee.ptstrName = (LPTSTR)pMainSid;
ea[1].grfAccessPermissions = dwSecondayPermissions;
ea[1].grfAccessMode = SET_ACCESS;
ea[1].grfInheritance = NO_INHERITANCE;
ea[1].Trustee.TrusteeForm = TRUSTEE_IS_SID;
ea[1].Trustee.TrusteeType = TRUSTEE_IS_USER;
ea[1].Trustee.ptstrName = (LPTSTR)pSecondarySid;
dwRes = SetEntriesInAclW(2, ea, NULL, &pACL);
if (dwRes != ERROR_SUCCESS)
goto Cleanup;
pSD = (PSECURITY_DESCRIPTOR)calloc(1, SECURITY_DESCRIPTOR_MIN_LENGTH);
if (NULL == pSD)
goto Cleanup;
if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION))
goto Cleanup;
if (!SetSecurityDescriptorDacl(pSD, TRUE, pACL, FALSE))
goto Cleanup;
*ppSD = pSD;
pSD = NULL;
bSuccess = TRUE;
Cleanup:
if (pACL)
LocalFree(pACL);
if (pSD)
free(pSD);
return bSuccess;
}
#endif

677
ExplorerPatcher/utility.h

@ -15,18 +15,33 @@
#include <restartmanager.h> #include <restartmanager.h>
#pragma comment(lib, "Rstrtmgr.lib") #pragma comment(lib, "Rstrtmgr.lib")
#define _LIBVALINET_INCLUDE_UNIVERSAL #define _LIBVALINET_INCLUDE_UNIVERSAL
#ifndef __cplusplus
#include <valinet/universal/toast/toast.h> #include <valinet/universal/toast/toast.h>
#endif
#include "osutility.h" #include "osutility.h"
#include "queryversion.h" #include "queryversion.h"
#pragma comment(lib, "Psapi.lib") #pragma comment(lib, "Psapi.lib")
#include <activscp.h> #include <activscp.h>
#include <netlistmgr.h> #include <netlistmgr.h>
#include <Psapi.h>
#include <stdbool.h>
#include "Localization.h"
#include "def.h" #include "def.h"
#define WM_MSG_GUI_SECTION WM_USER + 1 #define WM_MSG_GUI_SECTION WM_USER + 1
#define WM_MSG_GUI_SECTION_GET 1 #define WM_MSG_GUI_SECTION_GET 1
#ifdef __cplusplus
#define EP_INLINE inline
#else
#define EP_INLINE
#endif
#ifdef __cplusplus
extern "C" {
#endif
DEFINE_GUID(CLSID_ImmersiveShell, DEFINE_GUID(CLSID_ImmersiveShell,
0xc2f03a33, 0xc2f03a33,
0x21f5, 0x47fa, 0xb4, 0xbb, 0x21f5, 0x47fa, 0xb4, 0xbb,
@ -72,23 +87,25 @@ HRESULT ShellExecuteFromExplorer(
void ToggleTaskbarAutohide(); void ToggleTaskbarAutohide();
#pragma region "Weird stuff" #pragma region "Enable old taskbar"
INT64 STDMETHODCALLTYPE nimpl4_1(INT64 a1, DWORD* a2); typedef interface ITrayUIHost ITrayUIHost;
INT64 STDMETHODCALLTYPE nimpl4_0(INT64 a1, DWORD* a2);
__int64 STDMETHODCALLTYPE nimpl2(__int64 a1, uintptr_t* a2); typedef interface ITrayUI ITrayUI;
ULONG STDMETHODCALLTYPE nimpl3();
HRESULT STDMETHODCALLTYPE nimpl(); DEFINE_GUID(IID_ITrayUI,
HRESULT STDMETHODCALLTYPE nimpl1(__int64 a1, uintptr_t* a2, uintptr_t* a3); 0x12b454e1,
HRESULT STDMETHODCALLTYPE nimpl1_2(__int64 a1, uintptr_t* a2, uintptr_t* a3); 0x6e50, 0x42b8, 0xbc, 0x3e,
HRESULT STDMETHODCALLTYPE nimpl1_3(__int64 a1, uintptr_t* a2, uintptr_t* a3); 0xae, 0x7f, 0x54, 0x91, 0x99, 0xd6
__int64 STDMETHODCALLTYPE nimpl4(__int64 a1, __int64 a2, __int64 a3, BYTE* a4); );
typedef struct _IActivationFactoryAA
{ DEFINE_GUID(IID_ITrayUIComponent,
CONST_VTBL struct IActivationFactoryVtbl* lpVtbl; 0x27775f88,
struct IActivationFactoryVtbl* lpVtbl2; 0x01d3, 0x46ec, 0xa1, 0xc1,
struct IActivationFactoryVtbl* lpVtbl3; 0x64, 0xb4, 0xc0, 0x9b, 0x21, 0x1b
} IActivationFactoryAA; );
extern const IActivationFactoryAA XamlExtensionsFactory;
typedef HRESULT(*TrayUI_CreateInstance_t)(ITrayUIHost* host, REFIID riid, void** ppv);
EP_INLINE TrayUI_CreateInstance_t explorer_TrayUI_CreateInstanceFunc;
#pragma endregion #pragma endregion
inline int FileExistsW(wchar_t* file) inline int FileExistsW(wchar_t* file)
@ -106,22 +123,34 @@ inline int FileExistsW(wchar_t* file)
// https://stackoverflow.com/questions/1672677/print-a-guid-variable // https://stackoverflow.com/questions/1672677/print-a-guid-variable
void printf_guid(GUID guid); void printf_guid(GUID guid);
#ifdef _DEBUG
LRESULT CALLBACK BalloonWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK BalloonWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
__declspec(dllexport) CALLBACK ZZTestBalloon(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow); __declspec(dllexport) int CALLBACK ZZTestBalloon(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
__declspec(dllexport) CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow); __declspec(dllexport) int CALLBACK ZZTestToast(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
#endif
__declspec(dllexport) CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow); #ifndef EP_BUILD_SETUP
__declspec(dllexport) int CALLBACK ZZLaunchExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
__declspec(dllexport) CALLBACK ZZLaunchExplorerDelayed(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow); __declspec(dllexport) int CALLBACK ZZLaunchExplorerDelayed(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
__declspec(dllexport) CALLBACK ZZRestartExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow); __declspec(dllexport) int CALLBACK ZZRestartExplorer(HWND hWnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow);
#endif
#define MIN(X, Y) (((X) < (Y)) ? (X) : (Y)) #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y))
#define MAX(X, Y) (((X) > (Y)) ? (X) : (Y)) #define MAX(X, Y) (((X) > (Y)) ? (X) : (Y))
FARPROC SHRegGetValueFromHKCUHKLMFunc; typedef LSTATUS(*t_SHRegGetValueFromHKCUHKLM)(
PCWSTR pwszKey,
PCWSTR pwszValue,
int/*SRRF*/ srrfFlags,
DWORD* pdwType,
void* pvData,
DWORD* pcbData
);
EP_INLINE t_SHRegGetValueFromHKCUHKLM SHRegGetValueFromHKCUHKLMFunc;
inline LSTATUS SHRegGetValueFromHKCUHKLMWithOpt( inline LSTATUS SHRegGetValueFromHKCUHKLMWithOpt(
PCWSTR pwszKey, PCWSTR pwszKey,
@ -152,7 +181,7 @@ inline LSTATUS SHRegGetValueFromHKCUHKLMWithOpt(
pwszValue, pwszValue,
0, 0,
NULL, NULL,
pvData, (LPBYTE)pvData,
pcbData pcbData
); );
RegCloseKey(hKey); RegCloseKey(hKey);
@ -179,7 +208,7 @@ inline LSTATUS SHRegGetValueFromHKCUHKLMWithOpt(
pwszValue, pwszValue,
0, 0,
NULL, NULL,
pvData, (LPBYTE)pvData,
pcbData pcbData
); );
RegCloseKey(hKey); RegCloseKey(hKey);
@ -191,9 +220,9 @@ inline LSTATUS SHRegGetValueFromHKCUHKLMWithOpt(
return lRes; return lRes;
} }
static HWND(WINAPI* CreateWindowInBand)( EP_INLINE HWND(WINAPI* CreateWindowInBand)(
_In_ DWORD dwExStyle, _In_ DWORD dwExStyle,
_In_opt_ ATOM atom, _In_opt_ LPCWSTR lpClassName,
_In_opt_ LPCWSTR lpWindowName, _In_opt_ LPCWSTR lpWindowName,
_In_ DWORD dwStyle, _In_ DWORD dwStyle,
_In_ int X, _In_ int X,
@ -207,23 +236,59 @@ static HWND(WINAPI* CreateWindowInBand)(
DWORD band DWORD band
); );
BOOL(WINAPI* GetWindowBand)(HWND hWnd, PDWORD pdwBand); EP_INLINE BOOL(WINAPI* GetWindowBand)(HWND hWnd, PDWORD pdwBand);
EP_INLINE BOOL(WINAPI* SetWindowBand)(HWND hWnd, HWND hwndInsertAfter, DWORD dwBand);
EP_INLINE INT64(*SetWindowCompositionAttribute)(HWND, void*);
// uxtheme.dll private functions
typedef enum IMMERSIVE_COLOR_TYPE
{
// Defining only used ones
IMCLR_SystemAccentLight2 = 2,
IMCLR_SystemAccentDark2 = 6
} IMMERSIVE_COLOR_TYPE;
typedef struct IMMERSIVE_COLOR_PREFERENCE
{
DWORD crStartColor;
DWORD crAccentColor;
} IMMERSIVE_COLOR_PREFERENCE;
typedef enum IMMERSIVE_HC_CACHE_MODE
{
IHCM_USE_CACHED_VALUE = 0,
IHCM_REFRESH = 1
} IMMERSIVE_HC_CACHE_MODE;
typedef void(*GetThemeName_t)(void*, void*, void*); // 74
EP_INLINE GetThemeName_t GetThemeName;
BOOL(WINAPI* SetWindowBand)(HWND hWnd, HWND hwndInsertAfter, DWORD dwBand); typedef bool(*RefreshImmersiveColorPolicyState_t)(); // 104
EP_INLINE RefreshImmersiveColorPolicyState_t RefreshImmersiveColorPolicyState;
INT64(*SetWindowCompositionAttribute)(HWND, void*); typedef bool(*GetIsImmersiveColorUsingHighContrast_t)(IMMERSIVE_HC_CACHE_MODE); // 106
EP_INLINE GetIsImmersiveColorUsingHighContrast_t GetIsImmersiveColorUsingHighContrast;
static void(*SetPreferredAppMode)(INT64 bAllowDark); typedef HRESULT(*GetUserColorPreference_t)(IMMERSIVE_COLOR_PREFERENCE*, bool); // 120
EP_INLINE GetUserColorPreference_t GetUserColorPreference;
static void(*AllowDarkModeForWindow)(HWND hWnd, INT64 bAllowDark); typedef DWORD(*GetColorFromPreference_t)(const IMMERSIVE_COLOR_PREFERENCE*, IMMERSIVE_COLOR_TYPE, bool, IMMERSIVE_HC_CACHE_MODE); // 121
EP_INLINE GetColorFromPreference_t GetColorFromPreference;
static BOOL(*ShouldAppsUseDarkMode)(); typedef bool(*ShouldAppsUseDarkMode_t)(); // 132
EP_INLINE ShouldAppsUseDarkMode_t ShouldAppsUseDarkMode;
static BOOL(*ShouldSystemUseDarkMode)(); typedef void(*AllowDarkModeForWindow_t)(HWND hWnd, BOOL bAllowDark); // 133
EP_INLINE AllowDarkModeForWindow_t AllowDarkModeForWindow;
static void(*GetThemeName)(void*, void*, void*); typedef void(*SetPreferredAppMode_t)(BOOL bAllowDark); // 135
EP_INLINE SetPreferredAppMode_t SetPreferredAppMode;
static BOOL AppsShouldUseDarkMode() { return TRUE; } typedef bool(*ShouldSystemUseDarkMode_t)(); // 138
EP_INLINE ShouldSystemUseDarkMode_t ShouldSystemUseDarkMode;
void* ReadFromFile(wchar_t* wszFileName, DWORD* dwSize); void* ReadFromFile(wchar_t* wszFileName, DWORD* dwSize);
@ -231,6 +296,8 @@ int ComputeFileHash(LPCWSTR filename, LPSTR hash, DWORD dwHash);
int ComputeFileHash2(HMODULE hModule, LPCWSTR filename, LPSTR hash, DWORD dwHash); int ComputeFileHash2(HMODULE hModule, LPCWSTR filename, LPSTR hash, DWORD dwHash);
void GetHardcodedHash(LPCWSTR wszPath, LPSTR hash, DWORD dwHash);
void LaunchPropertiesGUI(HMODULE hModule); void LaunchPropertiesGUI(HMODULE hModule);
BOOL SystemShutdown(BOOL reboot); BOOL SystemShutdown(BOOL reboot);
@ -243,6 +310,10 @@ WCHAR* StrReplaceAllW(const WCHAR* s, const WCHAR* oldW, const WCHAR* newW, int*
HRESULT InputBox(BOOL bPassword, HWND hWnd, LPCWSTR wszPrompt, LPCWSTR wszTitle, LPCWSTR wszDefault, LPWSTR wszAnswer, DWORD cbAnswer, BOOL* bCancelled); HRESULT InputBox(BOOL bPassword, HWND hWnd, LPCWSTR wszPrompt, LPCWSTR wszTitle, LPCWSTR wszDefault, LPWSTR wszAnswer, DWORD cbAnswer, BOOL* bCancelled);
BOOL GetLogonSid(PSID* ppsid);
BOOL PrepareSecurityDescriptor(PSID pMainSid, DWORD dwMainPermissions, PSID pSecondarySid, DWORD dwSecondayPermissions, PSECURITY_DESCRIPTOR* ppSD);
inline BOOL IsHighContrast() inline BOOL IsHighContrast()
{ {
HIGHCONTRASTW highContrast; HIGHCONTRASTW highContrast;
@ -338,7 +409,7 @@ inline RM_UNIQUE_PROCESS GetExplorerApplication()
DWORD pid = 0; DWORD pid = 0;
GetWindowThreadProcessId(hwnd, &pid); GetWindowThreadProcessId(hwnd, &pid);
RM_UNIQUE_PROCESS out = { 0, { -1, -1 } }; RM_UNIQUE_PROCESS out = { 0, { (DWORD)-1, (DWORD)-1 } };
DWORD bytesReturned; DWORD bytesReturned;
WCHAR imageName[MAX_PATH]; // process image name buffer WCHAR imageName[MAX_PATH]; // process image name buffer
DWORD processIds[2048]; // max 2048 processes (more than enough) DWORD processIds[2048]; // max 2048 processes (more than enough)
@ -372,7 +443,7 @@ static DWORD RmSession = -1;
static wchar_t RmSessionKey[CCH_RM_SESSION_KEY + 1]; static wchar_t RmSessionKey[CCH_RM_SESSION_KEY + 1];
// shuts down the explorer and is ready for explorer restart // shuts down the explorer and is ready for explorer restart
inline void BeginExplorerRestart() inline DWORD WINAPI BeginExplorerRestart(LPVOID lpUnused)
{ {
if (RmStartSession(&RmSession, 0, RmSessionKey) == ERROR_SUCCESS) if (RmStartSession(&RmSession, 0, RmSessionKey) == ERROR_SUCCESS)
{ {
@ -390,6 +461,7 @@ inline void BeginExplorerRestart()
RmShutdown(RmSession, RmForceShutdown, 0); RmShutdown(RmSession, RmForceShutdown, 0);
} }
} }
return 0;
} }
// restarts the explorer // restarts the explorer
inline void FinishExplorerRestart() inline void FinishExplorerRestart()
@ -410,13 +482,45 @@ inline BOOL ExitExplorer()
return PostMessageW(hWndTray, 0x5B4, 0, 0); return PostMessageW(hWndTray, 0x5B4, 0, 0);
} }
inline void StartExplorerWithDelay(int delay) inline void StartExplorerWithDelay(int delay, HANDLE userToken)
{ {
WCHAR wszPath[MAX_PATH]; WCHAR wszPath[MAX_PATH];
ZeroMemory(wszPath, MAX_PATH * sizeof(WCHAR)); ZeroMemory(wszPath, MAX_PATH * sizeof(WCHAR));
GetWindowsDirectoryW(wszPath, MAX_PATH); GetWindowsDirectoryW(wszPath, MAX_PATH);
wcscat_s(wszPath, MAX_PATH, L"\\explorer.exe"); wcscat_s(wszPath, MAX_PATH, L"\\explorer.exe");
Sleep(delay); Sleep(delay);
if (userToken != INVALID_HANDLE_VALUE)
{
HANDLE primaryUserToken = INVALID_HANDLE_VALUE;
if (ImpersonateLoggedOnUser(userToken))
{
DuplicateTokenEx(userToken, MAXIMUM_ALLOWED, NULL, SecurityImpersonation, TokenPrimary, &primaryUserToken);
RevertToSelf();
}
if (primaryUserToken != INVALID_HANDLE_VALUE)
{
PROCESS_INFORMATION processInfo;
ZeroMemory(&processInfo, sizeof(processInfo));
STARTUPINFOW startupInfo;
ZeroMemory(&startupInfo, sizeof(startupInfo));
startupInfo.cb = sizeof(startupInfo);
BOOL processCreated = CreateProcessWithTokenW(
primaryUserToken, LOGON_WITH_PROFILE, wszPath, NULL, 0, NULL, NULL, &startupInfo, &processInfo) != 0;
CloseHandle(primaryUserToken);
if (processInfo.hProcess != INVALID_HANDLE_VALUE)
{
CloseHandle(processInfo.hProcess);
}
if (processInfo.hThread != INVALID_HANDLE_VALUE)
{
CloseHandle(processInfo.hThread);
}
if (processCreated)
{
return;
}
}
}
ShellExecuteW( ShellExecuteW(
NULL, NULL,
L"open", L"open",
@ -496,55 +600,281 @@ inline BOOL IncrementDLLReferenceCount(HINSTANCE hinst)
HMODULE hMod; HMODULE hMod;
GetModuleHandleExW( GetModuleHandleExW(
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
hinst, (LPCWSTR)hinst,
&hMod); &hMod);
return TRUE;
} }
inline BOOL WINAPI PatchContextMenuOfNewMicrosoftIME(BOOL* bFound) inline void SectionBeginAndSize(HMODULE hModule, const char* pszSectionName, PBYTE* beginSection, DWORD* sizeSection)
{ {
// huge thanks to @Simplestas: https://github.com/valinet/ExplorerPatcher/issues/598 *beginSection = NULL;
if (bFound) *bFound = FALSE; *sizeSection = 0;
const DWORD patch_from = 0x50653844, patch_to = 0x54653844; // cmp byte ptr [rbp+50h], r12b
HMODULE hInputSwitch = NULL; PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)hModule;
if (!GetModuleHandleExW(0, L"InputSwitch.dll", &hInputSwitch)) if (dosHeader->e_magic == IMAGE_DOS_SIGNATURE)
{ {
return FALSE; PIMAGE_NT_HEADERS64 ntHeader = (PIMAGE_NT_HEADERS64)((BYTE*)dosHeader + dosHeader->e_lfanew);
} if (ntHeader->Signature == IMAGE_NT_SIGNATURE)
PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)hInputSwitch; {
PIMAGE_NT_HEADERS pNTHeader = (PIMAGE_NT_HEADERS)((DWORD_PTR)dosHeader + dosHeader->e_lfanew); PIMAGE_SECTION_HEADER firstSection = IMAGE_FIRST_SECTION(ntHeader);
PIMAGE_SECTION_HEADER pSectionHeader = (PIMAGE_SECTION_HEADER)(pNTHeader + 1); for (unsigned int i = 0; i < ntHeader->FileHeader.NumberOfSections; ++i)
char* mod = 0;
int i;
for (i = 0; i < pNTHeader->FileHeader.NumberOfSections; i++)
{ {
//if (strcmp((char*)pSectionHeader[i].Name, ".text") == 0) PIMAGE_SECTION_HEADER section = firstSection + i;
if ((pSectionHeader[i].Characteristics & IMAGE_SCN_CNT_CODE) && pSectionHeader[i].SizeOfRawData) if (strncmp((const char*)section->Name, pszSectionName, IMAGE_SIZEOF_SHORT_NAME) == 0)
{ {
mod = (char*)dosHeader + pSectionHeader[i].VirtualAddress; *beginSection = (PBYTE)dosHeader + section->VirtualAddress;
*sizeSection = section->SizeOfRawData;
break; break;
} }
} }
if (!mod) }
}
}
__forceinline void TextSectionBeginAndSize(HMODULE hModule, PBYTE* beginSection, DWORD* sizeSection)
{
SectionBeginAndSize(hModule, ".text", beginSection, sizeSection);
}
__forceinline void RDataSectionBeginAndSize(HMODULE hModule, PBYTE* beginSection, DWORD* sizeSection)
{
SectionBeginAndSize(hModule, ".rdata", beginSection, sizeSection);
}
PVOID FindPattern(PVOID pBase, SIZE_T dwSize, LPCSTR lpPattern, LPCSTR lpMask);
#if _M_X64
inline BOOL FollowJump(PBYTE pInstr, BYTE shortOpcode, BYTE longOpcodeExt, DWORD* pInstrSize, PBYTE* pTarget)
{
// Check long
if (pInstr[0] == 0x0F && pInstr[1] == longOpcodeExt)
{
*pTarget = pInstr + 6 + *(int*)(pInstr + 2);
*pInstrSize = 6;
return TRUE;
}
// Check short
if (pInstr[0] == shortOpcode)
{ {
*pTarget = pInstr + 2 + *(char*)(pInstr + 1);
*pInstrSize = 2;
return TRUE;
}
return FALSE; return FALSE;
} }
for (size_t off = 0; off < pSectionHeader[i].Misc.VirtualSize - sizeof(DWORD); ++off)
inline BOOL FollowJnz(PBYTE pInstr, PBYTE* pTarget, DWORD* pInstrSize)
{ {
DWORD* ptr = (DWORD*)(mod + off); return FollowJump(pInstr, 0x75, 0x85, pInstrSize, pTarget);
if (*ptr == patch_from) }
inline BOOL FollowJz(PBYTE pInstr, PBYTE* pTarget, DWORD* pInstrSize)
{ {
if (bFound) *bFound = TRUE; return FollowJump(pInstr, 0x74, 0x84, pInstrSize, pTarget);
DWORD prot; }
if (VirtualProtect(ptr, sizeof(DWORD), PAGE_EXECUTE_READWRITE, &prot)) #endif
#if _M_ARM64
// https://github.com/CAS-Atlantic/AArch64-Encoding
__forceinline DWORD ARM64_ReadBits(DWORD value, int h, int l)
{ {
*ptr = patch_to; return (value >> l) & ((1 << (h - l + 1)) - 1);
VirtualProtect(ptr, sizeof(DWORD), prot, &prot);
} }
break;
__forceinline int ARM64_SignExtend(DWORD value, int numBits)
{
DWORD mask = 1 << (numBits - 1);
if (value & mask)
value |= ~((1 << numBits) - 1);
return (int)value;
} }
__forceinline int ARM64_ReadBitsSignExtend(DWORD insn, int h, int l)
{
return ARM64_SignExtend(ARM64_ReadBits(insn, h, l), h - l + 1);
}
__forceinline BOOL ARM64_IsInRange(int value, int bitCount)
{
int minVal = -(1 << (bitCount - 1));
int maxVal = (1 << (bitCount - 1)) - 1;
return value >= minVal && value <= maxVal;
}
__forceinline UINT_PTR ARM64_Align(UINT_PTR value, UINT_PTR alignment)
{
return value & ~(alignment - 1);
} }
__forceinline BOOL ARM64_IsCBZW(DWORD insn) { return ARM64_ReadBits(insn, 31, 24) == 0b00110100; }
__forceinline BOOL ARM64_IsCBNZW(DWORD insn) { return ARM64_ReadBits(insn, 31, 24) == 0b00110101; }
__forceinline BOOL ARM64_IsTBZ(DWORD insn) { return ARM64_ReadBits(insn, 31, 24) == 0b00110110; }
__forceinline BOOL ARM64_IsTBNZ(DWORD insn) { return ARM64_ReadBits(insn, 31, 24) == 0b00110111; }
__forceinline BOOL ARM64_IsBL(DWORD insn) { return ARM64_ReadBits(insn, 31, 26) == 0b100101; }
__forceinline BOOL ARM64_IsADRP(DWORD insn) { return (ARM64_ReadBits(insn, 31, 24) & ~0b01100000) == 0b10010000; }
__forceinline BOOL ARM64_IsMOVZW(DWORD insn) { return ARM64_ReadBits(insn, 31, 23) == 0b010100101; }
__forceinline BOOL ARM64_IsSTRBIMM(DWORD insn) { return ARM64_ReadBits(insn, 31, 22) == 0b0011100100; }
__forceinline DWORD* ARM64_FollowCBNZW(DWORD* pInsnCBNZW)
{
DWORD insnCBNZW = *pInsnCBNZW;
if (!ARM64_IsCBNZW(insnCBNZW))
return NULL;
int imm19 = ARM64_ReadBitsSignExtend(insnCBNZW, 23, 5);
return pInsnCBNZW + imm19; // offset = imm19 * 4
}
__forceinline DWORD* ARM64_FollowBL(DWORD* pInsnBL)
{
DWORD insnBL = *pInsnBL;
if (!ARM64_IsBL(insnBL))
return NULL;
int imm26 = ARM64_ReadBitsSignExtend(insnBL, 25, 0);
return pInsnBL + imm26; // offset = imm26 * 4
}
__forceinline DWORD ARM64_MakeB(int imm26)
{
if (!ARM64_IsInRange(imm26, 26))
return 0;
return 0b000101 << 26 | imm26 & (1 << 26) - 1;
}
__forceinline DWORD ARM64_CBZWToB(DWORD insnCBZW)
{
if (!ARM64_IsCBZW(insnCBZW))
return 0;
int imm19 = ARM64_ReadBitsSignExtend(insnCBZW, 23, 5);
return ARM64_MakeB(imm19);
}
__forceinline DWORD ARM64_CBNZWToB(DWORD insnCBNZW)
{
if (!ARM64_IsCBNZW(insnCBNZW))
return 0;
int imm19 = ARM64_ReadBitsSignExtend(insnCBNZW, 23, 5);
return ARM64_MakeB(imm19);
}
__forceinline DWORD ARM64_TBZToB(DWORD insnTBZ)
{
if (!ARM64_IsTBZ(insnTBZ))
return 0;
int imm14 = ARM64_ReadBitsSignExtend(insnTBZ, 18, 5);
return ARM64_MakeB(imm14);
}
__forceinline DWORD ARM64_TBNZToB(DWORD insnTBNZ)
{
if (!ARM64_IsTBNZ(insnTBNZ))
return 0;
int imm14 = ARM64_ReadBitsSignExtend(insnTBNZ, 18, 5);
return ARM64_MakeB(imm14);
}
__forceinline DWORD ARM64_DecodeADD(DWORD insnADD)
{
DWORD imm12 = ARM64_ReadBits(insnADD, 21, 10);
DWORD shift = ARM64_ReadBits(insnADD, 22, 22);
return imm12 << (shift * 12);
}
__forceinline DWORD ARM64_DecodeSTRBIMM(DWORD insnSTRBIMM)
{
if (ARM64_ReadBits(insnSTRBIMM, 31, 22) != 0b0011100100)
return (DWORD)-1;
DWORD imm12 = ARM64_ReadBits(insnSTRBIMM, 21, 10);
return imm12;
}
__forceinline DWORD ARM64_DecodeLDRBIMM(DWORD insnLDRBIMM)
{
if (ARM64_ReadBits(insnLDRBIMM, 31, 22) != 0b0011100101)
return (DWORD)-1;
DWORD imm12 = ARM64_ReadBits(insnLDRBIMM, 21, 10);
return imm12;
}
inline UINT_PTR ARM64_DecodeADRL(UINT_PTR offset, DWORD insnADRP, DWORD insnADD)
{
if (!ARM64_IsADRP(insnADRP))
return 0;
UINT_PTR page = ARM64_Align(offset, 0x1000);
DWORD adrp_immlo = ARM64_ReadBits(insnADRP, 30, 29);
DWORD adrp_immhi = ARM64_ReadBits(insnADRP, 23, 5);
DWORD adrp_imm = ((adrp_immhi << 2) | adrp_immlo) << 12;
DWORD add_imm = ARM64_DecodeADD(insnADD);
return page + adrp_imm + add_imm;
}
#endif
#if defined(WITH_MAIN_PATCHER) && WITH_MAIN_PATCHER
inline BOOL WINAPI PatchContextMenuOfNewMicrosoftIME(BOOL* bFound)
{
// huge thanks to @Simplestas: https://github.com/valinet/ExplorerPatcher/issues/598
HMODULE hInputSwitch = NULL;
if (!GetModuleHandleExW(0, L"InputSwitch.dll", &hInputSwitch))
return FALSE;
MODULEINFO mi;
GetModuleInformation(GetCurrentProcess(), hInputSwitch, &mi, sizeof(mi));
#if defined(_M_X64)
// 44 38 ?? ?? 74 ?? ?? 8B CE E8 ?? ?? ?? ?? 85 C0
// ^^ Change jz into jmp
PBYTE match = (PBYTE)FindPattern(
hInputSwitch,
mi.SizeOfImage,
"\x44\x38\x00\x00\x74\x00\x00\x8B\xCE\xE8\x00\x00\x00\x00\x85\xC0",
"xx??x??xxx????xx"
);
if (!match)
return FALSE;
DWORD dwOldProtect;
if (!VirtualProtect(match + 4, 1, PAGE_EXECUTE_READWRITE, &dwOldProtect))
return FALSE;
match[4] = 0xEB;
VirtualProtect(match + 4, 1, dwOldProtect, &dwOldProtect);
return TRUE;
#elif defined(_M_ARM64)
// A8 43 40 39 C8 04 00 34 E0 03 14 AA
// ^^^^^^^^^^^ Change CBZ to B
PBYTE match = (PBYTE)FindPattern(
hInputSwitch,
mi.SizeOfImage,
"\xA8\x43\x40\x39\xC8\x04\x00\x34\xE0\x03\x14\xAA",
"xxxxxxxxxxxx"
);
if (!match)
return FALSE;
match += 4;
DWORD newInsn = ARM64_CBZWToB(*(DWORD*)match);
if (!newInsn)
return FALSE;
DWORD dwOldProtect;
if (!VirtualProtect(match, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect))
return FALSE;
*(DWORD*)match = newInsn;
VirtualProtect(match, 4, dwOldProtect, &dwOldProtect);
return TRUE; return TRUE;
#endif
} }
#endif
extern UINT PleaseWaitTimeout; extern UINT PleaseWaitTimeout;
extern HHOOK PleaseWaitHook; extern HHOOK PleaseWaitHook;
@ -560,4 +890,217 @@ BOOL DownloadAndInstallWebView2Runtime();
BOOL DownloadFile(LPCWSTR wszURL, DWORD dwSize, LPCWSTR wszPath); BOOL DownloadFile(LPCWSTR wszURL, DWORD dwSize, LPCWSTR wszPath);
BOOL IsConnectedToInternet(); BOOL IsConnectedToInternet();
#define SCRATCH_QCM_FIRST 1
#define SCRATCH_QCM_LAST 0x7FFF
#define SPOP_OPENMENU 1
#define SPOP_INSERTMENU_ALL 0b1111110000
#define SPOP_INSERTMENU_OPEN 0b0000010000
#define SPOP_INSERTMENU_NEXTPIC 0b0000100000
#define SPOP_INSERTMENU_LIKE 0b0001000000
#define SPOP_INSERTMENU_DISLIKE 0b0010000000
#define SPOP_INSERTMENU_INFOTIP1 0b0100000000
#define SPOP_INSERTMENU_INFOTIP2 0b1000000000
#define SPOP_CLICKMENU_FIRST 40000
#define SPOP_CLICKMENU_OPEN 40000
#define SPOP_CLICKMENU_NEXTPIC 40001
#define SPOP_CLICKMENU_LIKE 40002
#define SPOP_CLICKMENU_DISLIKE 40003
#define SPOP_CLICKMENU_LAST 40003
BOOL DoesOSBuildSupportSpotlight();
BOOL IsSpotlightEnabled();
void SpotlightHelper(DWORD dwOp, HWND hWnd, HMENU hMenu, LPPOINT pPt);
typedef struct _MonitorOverrideData
{
DWORD cbIndex;
DWORD dwIndex;
HMONITOR hMonitor;
} MonitorOverrideData;
BOOL ExtractMonitorByIndex(HMONITOR hMonitor, HDC hDC, LPRECT lpRect, MonitorOverrideData* mod);
HRESULT SHRegGetBOOLWithREGSAM(HKEY key, LPCWSTR subKey, LPCWSTR value, REGSAM regSam, BOOL* data);
HRESULT SHRegGetDWORD(HKEY hkey, const WCHAR* pwszSubKey, const WCHAR* pwszValue, DWORD* pdwData);
inline BOOL MaskCompare(PVOID pBuffer, LPCSTR lpPattern, LPCSTR lpMask)
{
for (PBYTE value = (PBYTE)pBuffer; *lpMask; ++lpPattern, ++lpMask, ++value)
{
if (*lpMask == 'x' && *(LPCBYTE)lpPattern != *value)
return FALSE;
}
return TRUE;
}
inline __declspec(noinline) PVOID FindPatternHelper(PVOID pBase, SIZE_T dwSize, LPCSTR lpPattern, LPCSTR lpMask)
{
for (SIZE_T index = 0; index < dwSize; ++index)
{
PBYTE pAddress = (PBYTE)pBase + index;
if (MaskCompare(pAddress, lpPattern, lpMask))
return pAddress;
}
return NULL;
}
inline PVOID FindPattern(PVOID pBase, SIZE_T dwSize, LPCSTR lpPattern, LPCSTR lpMask)
{
dwSize -= strlen(lpMask);
return FindPatternHelper(pBase, dwSize, lpPattern, lpMask);
}
inline UINT_PTR FileOffsetToRVA(PBYTE pBase, UINT_PTR offset)
{
PIMAGE_DOS_HEADER pDosHeader = (PIMAGE_DOS_HEADER)pBase;
PIMAGE_NT_HEADERS pNtHeaders = (PIMAGE_NT_HEADERS)(pBase + pDosHeader->e_lfanew);
PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pNtHeaders);
for (int i = 0; i < pNtHeaders->FileHeader.NumberOfSections; i++, pSection++)
{
if (offset >= pSection->PointerToRawData && offset < pSection->PointerToRawData + pSection->SizeOfRawData)
return offset - pSection->PointerToRawData + pSection->VirtualAddress;
}
return 0;
}
inline UINT_PTR RVAToFileOffset(PBYTE pBase, UINT_PTR rva)
{
PIMAGE_DOS_HEADER pDosHeader = (PIMAGE_DOS_HEADER)pBase;
PIMAGE_NT_HEADERS pNtHeaders = (PIMAGE_NT_HEADERS)(pBase + pDosHeader->e_lfanew);
PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pNtHeaders);
for (int i = 0; i < pNtHeaders->FileHeader.NumberOfSections; i++, pSection++)
{
if (rva >= pSection->VirtualAddress && rva < pSection->VirtualAddress + pSection->Misc.VirtualSize)
return rva - pSection->VirtualAddress + pSection->PointerToRawData;
}
return 0;
}
inline HMODULE LoadGuiModule()
{
wchar_t epGuiPath[MAX_PATH];
ZeroMemory(epGuiPath, sizeof(epGuiPath));
SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, epGuiPath);
wcscat_s(epGuiPath, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\ep_gui.dll");
return LoadLibraryExW(epGuiPath, NULL, LOAD_LIBRARY_AS_DATAFILE);
}
inline BOOL DoesWindows10StartMenuExist()
{
if (!IsWindows11())
return TRUE;
wchar_t szPath[MAX_PATH];
GetWindowsDirectoryW(szPath, MAX_PATH);
wcscat_s(szPath, MAX_PATH, L"\\SystemApps\\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\\StartUI.dll");
if (FileExistsW(szPath))
return TRUE;
GetWindowsDirectoryW(szPath, MAX_PATH);
wcscat_s(szPath, MAX_PATH, L"\\SystemApps\\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\\StartUI_.dll");
if (FileExistsW(szPath))
return TRUE;
return FALSE;
}
inline BOOL IsStockWindows10TaskbarAvailable()
{
#if _M_X64
return global_rovi.dwBuildNumber < 26002;
#else
return !IsWindows11();
#endif
}
inline const WCHAR* PickTaskbarDll()
{
DWORD b = global_rovi.dwBuildNumber;
if (b == 15063 // Windows 10 1703
|| b == 16299 // Windows 10 1709
|| b == 17134 // Windows 10 1803
|| b == 17763 // Windows 10 1809
|| b >= 18362 && b <= 18363 // Windows 10 1903, 1909
|| b >= 19041 && b <= 19045) // Windows 10 20H2, 21H2, 22H2
{
return L"ep_taskbar.0.dll";
}
if (b >= 21343 && b <= 22000) // Windows 11 21H2
{
return L"ep_taskbar.1.dll";
}
if ((b >= 22621 && b <= 22635) // 22H2-23H2 Release, Release Preview, and Beta channels
|| (b >= 23403 && b <= 25197)) // Early pre-reboot Dev channel until post-reboot Dev channel
{
return L"ep_taskbar.2.dll";
}
if (b >= 25201 && b <= 25915) // Pre-reboot Dev channel until early Canary channel, nuked ITrayComponentHost methods related to classic search box
{
return L"ep_taskbar.3.dll";
}
if (b >= 25921 && b <= 26040) // Canary channel with nuked classic system tray
{
return L"ep_taskbar.4.dll";
}
if (b >= 26052) // Same as 4 but with 2 new methods in ITrayComponentHost between GetTrayUI and ProgrammableTaskbarReportClick
{
return L"ep_taskbar.5.dll";
}
return NULL;
}
inline BOOL DoesTaskbarDllExist()
{
const wchar_t* pszTaskbarDll = PickTaskbarDll();
if (!pszTaskbarDll)
return FALSE;
wchar_t szPath[MAX_PATH];
ZeroMemory(szPath, sizeof(szPath));
SHGetFolderPathW(NULL, SPECIAL_FOLDER, NULL, SHGFP_TYPE_CURRENT, szPath);
wcscat_s(szPath, MAX_PATH, _T(APP_RELATIVE_PATH) L"\\");
wcscat_s(szPath, MAX_PATH, pszTaskbarDll);
return FileExistsW(szPath);
}
inline void AdjustTaskbarStyleValue(DWORD* pdwValue)
{
if (*pdwValue >= 2 && !DoesTaskbarDllExist())
{
*pdwValue = 1;
}
if (IsWindows11())
{
if (*pdwValue == 1 && !IsStockWindows10TaskbarAvailable())
{
*pdwValue = 0;
}
}
else
{
if (*pdwValue == 0)
{
*pdwValue = 1; // There's no such thing as Windows 11 taskbar on Windows 10
}
}
}
#ifdef __cplusplus
}
#endif
#endif #endif

1
FUNDING.yml

@ -1 +1,2 @@
custom: ['https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher'] custom: ['https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher']
github: 'Amrsatrio'

64
README.md

@ -1,49 +1,25 @@
# ExplorerPatcher # ExplorerPatcher
This project aims to enhance the working environment on Windows.
PayPal donations: [here](https://www.paypal.com/donate?business=valentingabrielradu%40gmail.com&no_recurring=0&item_name=ExplorerPatcher&currency_code=EUR) or using e-mail address valentingabrielradu@gmail.com
![Build status](https://github.com/valinet/ExplorerPatcher/actions/workflows/build.yml/badge.svg)
## Feature summary
* Choose between Windows 11 or Windows 10 taskbar (with labels support, small icons and lots of customization). This project aims to enhance the working environment on Windows.
* Disable Windows 11 context menu and command bar in File Explorer and more.
* Open Start to All apps by default, choose number of frequent apps to show, display on active monitor and more.
* Choose between the Windows 11, Windows 10 and Windows NT Alt-Tab window switcher with customization.
* Lots of quality of life improvements for the shell, like:
* Skin tray menus to match Windows style, make them behave like flyouts and center them relative to the icon.
* Choose action when left and/or right clicking the network icon.
* Revert to the Windows 7 search box in File Explorer, or disable Windows Search altogether.
* Disable immersive menus and use mitigations that help you run the real classic theme without glitches.
* Learn more about all the functionality offered by this program starting with this article in the wiki, [here](https://github.com/valinet/ExplorerPatcher/wiki/All-features).
Some features may not be available on Windows 10.
## How to? ## How to?
1. Download the latest version of the [setup program](https://github.com/valinet/ExplorerPatcher/releases/latest/download/ep_setup.exe). 1. Download the latest version of the setup program in [here](https://github.com/valinet/ExplorerPatcher/releases/latest).
2. Run the installer. It will automatically prompt for elevation, after which it will install the necessary files. * Choose `ep_setup.exe` if your device uses an Intel or AMD processor, or `ep_setup_arm64.exe` if your device uses a Snapdragon processor.
3. When done, you will be greeted with the familiar Windows 10 taskbar. To customize the options offered by the program, right click the taskbar and choose "Properties". 1. Run the installer. It will automatically prompt for elevation, after which it will close `explorer.exe` and install the necessary files. When done, you will see the desktop again and the Windows 10 taskbar.
1. Right-click the taskbar and choose "Properties".
That's it. It's that simple. 1. To change the taskbar style, go to the "Taskbar" section and look for "Taskbar style".
1. To use the Windows 10 Start menu, go to the "Start menu" section and change the Start menu style to Windows 10.
1. To use the Windows 10 Alt+Tab, go to the "Window switcher" section and change the "Window switcher (Alt+tab) style" to Windows 10.
1. Feel free to check other configuration options.
## What next? That's it!
* Consult the [wiki](https://github.com/valinet/ExplorerPatcher/wiki) - this is highly recommended. There you will find information about more advanced tasks, modes of operation and features offered by this patcher. **Note:** Some features may be unavailable on some Windows versions.
* Get familiar with most of the features offered by this patcher [here](https://github.com/valinet/ExplorerPatcher/wiki/All-features).
* Learn how to manage updates and what to expect from new versions and new Windows builds [here](https://github.com/valinet/ExplorerPatcher/wiki/Configure-updates).
* Have a question? Consult the [Frequently Asked Questions](https://github.com/valinet/ExplorerPatcher/wiki/Frequently-asked-questions).
* Some other question? Open a thread in [Discussions](https://github.com/valinet/ExplorerPatcher/discussions).
* Found a bug, have an issue or a problem with the application? Read [here](https://github.com/valinet/ExplorerPatcher/wiki/Reporting-problems) what to do next.
* I highly encourage you to check out the [source code](https://github.com/valinet/ExplorerPatcher/tree/master) and tinker with it. I am open to merging new features, enhancements and fixes; also, I think it provides good insights on topics of interests in this area.
## Known issues
Items marked with "bug" that are still "Open" represent known issues. Active work is undergone regarding an item if it is additionally marked with "investigating". Help is especially required for items marked with "help wanted". Consult the list in [Issues](https://github.com/valinet/ExplorerPatcher/issues).
## Uninstalling ## Uninstalling
* Right click the taskbar then click "Properties" or search for "ExplorerPatcher", and go to "Uninstall" section or
* Use "Programs and Features" in Control Panel, or "Apps and features" in the Settings app or * Use "Programs and Features" in Control Panel, or "Apps and features" in the Settings app or
* Run `ep_setup.exe /uninstall` or * Run `ep_setup.exe /uninstall` or
* Rename `ep_setup.exe` to `ep_uninstall.exe` and run that. * Rename `ep_setup.exe` to `ep_uninstall.exe` and run that.
@ -51,10 +27,16 @@ Items marked with "bug" that are still "Open" represent known issues. Active wor
## Updating ## Updating
* The program features built-in updates: go to "Properties" - "Updates" to configure, check for and install the latest updates. Learn more [here](https://github.com/valinet/ExplorerPatcher/wiki/Configure-updates). * The program features built-in updates: go to "Properties" - "Updates" to configure, check for and install the latest updates. Learn more [here](https://github.com/valinet/ExplorerPatcher/wiki/Configure-updates).
* Download the latest version's setup file and simply run it. * Download the latest version's [setup file for x64](https://github.com/valinet/ExplorerPatcher/releases/latest/download/ep_setup.exe) or [setup file for ARM64](https://github.com/valinet/ExplorerPatcher/releases/latest/download/ep_setup_arm64.exe) and simply run it.
## Donate
If you find this project essential to your daily life, please consider donating to support the development through the [Sponsor](https://github.com/valinet/ExplorerPatcher?sponsor) button at the top of this page, so that we can continue to keep supporting newer Windows builds.
## Discord Server
Join our Discord server if you need support, want to chat regarding this project, or just want to hang out with us!
## More information [![Join on Discord](https://discordapp.com/api/guilds/1155912047897350204/widget.png?style=shield)](https://discord.gg/gsPcfqHTD2)
* [How does this work?](https://github.com/valinet/ExplorerPatcher/wiki/How-does-it-work) [Read more](https://github.com/valinet/ExplorerPatcher/wiki)
* [About antivirus false positives](https://github.com/valinet/ExplorerPatcher/wiki/Antivirus-false-positives)
* [Compiling](https://github.com/valinet/ExplorerPatcher/wiki/Compiling)

2
ep_dwm

@ -1 +1 @@
Subproject commit 3582747da01b6a52aa0b7d7472c18c0a391cfd3f Subproject commit afdff313b005792f58fbaa8ec08dfbc9ea921aba

5
ep_extra/README.md

@ -0,0 +1,5 @@
# ExplorerPatcher Custom Libraries Chainloader
ExplorerPatcher has a simple, built-in mechanism that allows users to load their own DLL into `explorer.exe` right after ExplorerPatcher finishes initializing its hooks. Interested users should place a DLL called `ep_extra.dll` in `C:\Windows`. When ExplorerPatcher finishes its setup, it loads the `ep_extra.dll` library and calls the `ep_extra_EntryPoint` function. Although this is very useful so that users can load their custom code, it is quite limited at the moment, as it loads just one DLL.
This project is a solution to this issue. A chainloader is implemented here, that looks for other modules matching the `ep_extra_*.dll` pattern in `C:\Windows` as well, and loads them one after the other.

100
ep_extra/ep_extra.rc

@ -0,0 +1,100 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "VALINET Solutions SRL"
VALUE "FileDescription", "ExplorerPatcher Custom Libraries Chainloader"
VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "ep_extra.dll"
VALUE "LegalCopyright", "Copyright (C) 2006-2025 VALINET Solutions SRL. All rights reserved."
VALUE "OriginalFilename", "ep_extra.dll"
VALUE "ProductName", "ExplorerPatcher"
VALUE "ProductVersion", "1.0.0.0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

179
ep_extra/ep_extra.vcxproj

@ -0,0 +1,179 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{93fa47cc-7753-4f86-b583-69048f51c5ab}</ProjectGuid>
<RootNamespace>epextra</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<AdditionalOptions>/EXPORT:ep_extra_EntryPoint %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<AdditionalOptions>/EXPORT:ep_extra_EntryPoint %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<AdditionalOptions>/EXPORT:ep_extra_EntryPoint %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ModuleDefinitionFile>
</ModuleDefinitionFile>
<AdditionalOptions>%(AdditionalOptions)</AdditionalOptions>
</Link>
<MASM />
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="worker.c" />
</ItemGroup>
<ItemGroup>
<MASM Include="main.asm" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ep_extra.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
</Project>

37
ep_extra/ep_extra.vcxproj.filters

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="worker.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<MASM Include="main.asm">
<Filter>Source Files</Filter>
</MASM>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ep_extra.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

18
ep_extra/main.asm

@ -0,0 +1,18 @@
EXTERN worker : PROC
.CODE
ep_extra_EntryPoint PROC EXPORT
PUSH RBP
MOV RBP, RSP
SUB RSP, 30H
CALL worker
CMP RAX, 0
JE finish
JMP RAX
finish:
LEAVE
RET
ep_extra_EntryPoint ENDP
END

14
ep_extra/resource.h

@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by ep_extra.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

82
ep_extra/worker.c

@ -0,0 +1,82 @@
#include <Windows.h>
#include <Shlwapi.h>
#pragma comment(lib, "Shlwapi.lib")
#include <stdio.h>
HMODULE hModule = NULL;
HANDLE sigFinish = NULL;
void* pFinishProc = NULL;
void done() {
WaitForSingleObject(sigFinish, INFINITE);
FreeLibraryAndExitThread(hModule, 0);
}
void* worker() {
wchar_t pattern[MAX_PATH];
GetWindowsDirectoryW(pattern, MAX_PATH);
wcscat_s(pattern, MAX_PATH, L"\\ep_extra_*.dll");
WIN32_FIND_DATA data;
HANDLE hFind = FindFirstFileW(pattern, &data);
if (hFind != INVALID_HANDLE_VALUE) {
do {
wprintf(L">> Found ep_extra library: \"%s\"\n", data.cFileName);
GetWindowsDirectoryW(pattern, MAX_PATH);
wcscat_s(pattern, MAX_PATH, L"\\");
wcscat_s(pattern, MAX_PATH, data.cFileName);
HMODULE hLib = LoadLibraryW(pattern);
if (hLib) {
FARPROC proc = (FARPROC)(GetProcAddress(hLib, "setup"));
if (proc) {
if (proc()) FreeLibrary(hLib);
}
else FreeLibrary(hLib);
}
} while (FindNextFileW(hFind, &data));
FindClose(hFind);
}
sigFinish = CreateEventW(NULL, FALSE, FALSE, NULL);
if (sigFinish) {
BYTE payload[] = {
0x48, 0xB9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov rcx, sigFinish
0x48, 0xB8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // mov rax, SetEvent
0xFF, 0xD0, // call SetEvent
0xC9, // leave
0xC3 // ret
};
*(INT64*)(payload + 2) = sigFinish;
*(INT64*)(payload + 12) = SetEvent;
pFinishProc = VirtualAlloc(NULL, sizeof(payload), MEM_COMMIT, PAGE_EXECUTE_READWRITE);
if (pFinishProc) {
memcpy(pFinishProc, payload, sizeof(payload));
SHCreateThread(done, 0, CTF_NOADDREFLIB, NULL);
return pFinishProc;
}
}
return NULL;
}
BOOL WINAPI DllMain(
_In_ HINSTANCE hinstDLL,
_In_ DWORD fdwReason,
_In_ LPVOID lpvReserved
)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
hModule = hinstDLL;
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

9
ep_extra_valinet.win7alttab/README.md

@ -0,0 +1,9 @@
# ExplorerPatcher Windows 7 Alt-Tab Module
This module patches the Windows 7 genuine Alt-Tab implementation to work on newer Windows versions.
To install, make sure you have the following files in `C:\Windows`:
* `ep_extra_valinet.win7alttab.dll` - this DLL
* `ep_extra.dll` - a chainloader capable of being invoked by ExplorerPatcher (implements `ep_extra_EntryPoint` and which loads other `ep_extra_*.dll` modules
* `AltTab.dll` - a copy of the `AltTab.dll` in `C:\Windows\System32` from a Windows 7 installation

100
ep_extra_valinet.win7alttab/Resource.rc

@ -0,0 +1,100 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "VALINET Solutions SRL"
VALUE "FileDescription", "ExplorerPatcher Windows 7 Alt-Tab Module"
VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "ep_extra_valinet.win7alttab"
VALUE "LegalCopyright", "Copyright (C) 2006-2025 VALINET Solutions SRL. All rights reserved."
VALUE "OriginalFilename", "ep_extra_valinet.win7alttab"
VALUE "ProductName", "ExplorerPatcher"
VALUE "ProductVersion", "1.0.0.0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

161
ep_extra_valinet.win7alttab/ep_extra_valinet.win7alttab.vcxproj

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{a66c5f27-dbf8-45a4-bdf3-ba54d8d82d0f}</ProjectGuid>
<RootNamespace>epextravalinetwin7alttab</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_error.c" />
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_tshwnd.c" />
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_WindowHelpers.c" />
<ClCompile Include="main.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\libs\libvalinet\valinet\hooking\iatpatch.h" />
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

44
ep_extra_valinet.win7alttab/ep_extra_valinet.win7alttab.vcxproj.filters

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_WindowHelpers.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_error.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\libs\sws\SimpleWindowSwitcher\sws_tshwnd.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\libs\libvalinet\valinet\hooking\iatpatch.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

120
ep_extra_valinet.win7alttab/main.c

@ -0,0 +1,120 @@
#include <initguid.h>
#include <Windows.h>
#include "../libs/libvalinet/valinet/hooking/iatpatch.h"
#include "../libs/sws/SimpleWindowSwitcher/sws_WindowHelpers.h"
#pragma comment(lib, "Uxtheme.lib")
HMODULE hModule = NULL;
HMODULE hAltTab = NULL;
IOleCommandTarget* pAltTabSSO = NULL;
DEFINE_GUID(CLSID_AltTabSSO,
0xA1607060, 0x5D4C, 0x467A, 0xB7, 0x11, 0x2B, 0x59, 0xA6, 0xF2, 0x59, 0x57);
HRESULT AltTab_DwmpActivateLivePreview(int s, HWND hWnd, int c, int d) {
return S_OK;
}
int AltTab_LoadStringW(HINSTANCE hInstance, UINT uID, LPWSTR lpBuffer, int cchBufferMax) {
if (uID == 0x3E8) {
swprintf_s(lpBuffer, cchBufferMax, L"AltTab"); return 6;
}
else if (uID == 0x3EA) {
if (cchBufferMax < MAX_PATH) return 0;
sws_WindowHelpers_GetDesktopText(lpBuffer);
int len = wcslen(lpBuffer);
for (int i = 0; i < len; ++i) if (lpBuffer[i] == L'&') lpBuffer[i] = L'\u200E';
return len;
}
return LoadStringW(hInstance, uID, lpBuffer, cchBufferMax);
}
HTHEME AltTab_OpenThemeData(HWND hwnd, LPCWSTR pszClassList) {
if (!wcscmp(pszClassList, L"AltTab")) return OpenThemeData(hwnd, L"WINDOW");
return OpenThemeData(hwnd, pszClassList);
}
HRESULT AltTab_DrawThemeTextEx(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, LPCWSTR pszText, int cchText, DWORD dwTextFlags, LPRECT pRect, const DTTOPTS* pOptions) {
HRESULT hr = S_OK;
HTHEME hTheme2 = OpenThemeData(NULL, L"TEXTSTYLE");
if (hTheme2) hr = DrawThemeTextEx(hTheme2, hdc, iPartId + 1, iStateId, pszText, cchText, dwTextFlags, pRect, pOptions);
if (hTheme2) CloseThemeData(hTheme2);
return hr;
}
BOOL AltTab_IsWindowEnabled(HWND hWnd) {
if (!IsWindowEnabled(hWnd)) return FALSE;
BOOL isCloaked;
DwmGetWindowAttribute(hWnd, DWMWA_CLOAKED, &isCloaked, sizeof(BOOL));
if (isCloaked) return FALSE;
if (sws_IsShellFrameWindow(hWnd) && !_sws_GhostWindowFromHungWindow(hWnd)) return TRUE;
if (_sws_IsShellManagedWindow(hWnd) && !sws_WindowHelpers_ShouldTreatShellManagedWindowAsNotShellManaged(hWnd)) return FALSE;
if (sws_WindowHelpers_IsWindowShellManagedByExplorerPatcher(hWnd)) return FALSE;
return TRUE;
}
HRESULT AltTab_DwmExtendFrameIntoClientArea(HWND hWnd, const MARGINS* pMarInset) {
HRESULT hr = DwmExtendFrameIntoClientArea(hWnd, pMarInset);
sws_WindowHelpers_SetMicaMaterialForThisWindow(hWnd, TRUE);
return hr;
}
BOOL AltTab_PostMessageW(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
if (hWnd == FindWindowW(L"Shell_TrayWnd", NULL) && uMsg == 0x5B7 && wParam == 0 && lParam == 0) {
return PostMessageW(hWnd, WM_COMMAND, 407, 0);
}
return PostMessageW(hWnd, uMsg, wParam, lParam);
}
__declspec(dllexport) void clean() {
if (pAltTabSSO) pAltTabSSO->lpVtbl->Release(pAltTabSSO);
if (hAltTab) sws_WindowHelpers_Clear();
}
__declspec(dllexport) int setup() {
hAltTab = LoadLibraryW(L"AltTab.dll");
if (hAltTab) {
sws_WindowHelpers_Initialize();
VnPatchIAT(hAltTab, "dwmapi.dll", "DwmExtendFrameIntoClientArea", AltTab_DwmExtendFrameIntoClientArea);
VnPatchIAT(hAltTab, "dwmapi.dll", (LPCSTR)113, AltTab_DwmpActivateLivePreview);
VnPatchIAT(hAltTab, "user32.dll", "PostMessageW", AltTab_PostMessageW);
VnPatchIAT(hAltTab, "user32.dll", "LoadStringW", AltTab_LoadStringW);
VnPatchIAT(hAltTab, "user32.dll", "IsWindowEnabled", AltTab_IsWindowEnabled);
VnPatchDelayIAT(hAltTab, "uxtheme.dll", "OpenThemeData", AltTab_OpenThemeData);
VnPatchDelayIAT(hAltTab, "uxtheme.dll", "DrawThemeTextEx", AltTab_DrawThemeTextEx);
HRESULT(*pDllGetClassObject)(REFCLSID, REFIID, LPVOID) = GetProcAddress(hAltTab, "DllGetClassObject");
IClassFactory* pFactory = NULL;
if (pDllGetClassObject && SUCCEEDED(pDllGetClassObject(&CLSID_AltTabSSO, &IID_IClassFactory, &pFactory)) && pFactory) {
if (SUCCEEDED(pFactory->lpVtbl->CreateInstance(pFactory, NULL, &IID_IOleCommandTarget, &pAltTabSSO)) && pAltTabSSO) {
if (SUCCEEDED(pAltTabSSO->lpVtbl->Exec(pAltTabSSO, &CGID_ShellServiceObject, 2, 0, NULL, NULL))) {
printf(">>> Using Windows 7 AltTab\n");
}
}
pFactory->lpVtbl->Release(pFactory);
}
FreeLibrary(hAltTab);
return 0;
}
return 1;
}
BOOL WINAPI DllMain(
_In_ HINSTANCE hinstDLL,
_In_ DWORD fdwReason,
_In_ LPVOID lpvReserved
) {
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
hModule = hinstDLL;
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

14
ep_extra_valinet.win7alttab/resource.h

@ -0,0 +1,14 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Resource.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

4
ep_generate_release_description/ep_generate_release_description.c

@ -22,6 +22,9 @@ int main(int argc, char** argv)
sprintf_s(szEndPattern, MAX_PATH, "## "); sprintf_s(szEndPattern, MAX_PATH, "## ");
FILE* f = NULL; FILE* f = NULL;
fopen_s(&f, "..\\..\\..\\" FILE_NAME, "r");
if (!f)
{
fopen_s(&f, "..\\..\\" FILE_NAME, "r"); fopen_s(&f, "..\\..\\" FILE_NAME, "r");
if (!f) if (!f)
{ {
@ -31,6 +34,7 @@ int main(int argc, char** argv)
fopen_s(&f, "" FILE_NAME, "r"); fopen_s(&f, "" FILE_NAME, "r");
} }
} }
}
if (f) if (f)
{ {
int state = 0; int state = 0;

16
ep_generate_release_description/ep_generate_release_description.vcxproj

@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
@ -72,19 +72,19 @@
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>

16
ep_generate_release_name/ep_generate_release_name.vcxproj

@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
@ -72,19 +72,19 @@
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>

923
ExplorerPatcher/GUI.c → ep_gui/GUI.c

File diff suppressed because it is too large Load Diff

27
ExplorerPatcher/GUI.h → ep_gui/GUI.h

@ -20,14 +20,13 @@ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#pragma comment(lib, "UxTheme.lib") #pragma comment(lib, "UxTheme.lib")
#include <dwmapi.h> #include <dwmapi.h>
#pragma comment(lib, "Dwmapi.lib") #pragma comment(lib, "Dwmapi.lib")
#include "resource.h" #include "resources/resource.h"
#include "getline.h" #include "../ExplorerPatcher/getline.h"
#include "fmemopen.h" #include "../ExplorerPatcher/fmemopen.h"
#include "utility.h" #include "../ExplorerPatcher/Localization.h"
#include "../ep_weather_host/ep_weather.h" #include "../ExplorerPatcher/utility.h"
#include "../ep_weather_host/ep_weather_host_h.h" #include "ep_weather.h"
#include <ExDisp.h> #include "ep_weather_host_h.h"
#include <ShlGuid.h>
#define MAX_LINE_LENGTH 2000 #define MAX_LINE_LENGTH 2000
extern HMODULE hModule; extern HMODULE hModule;
@ -50,7 +49,7 @@ extern HMODULE hModule;
#define GUI_MAX_TABORDER 9999 #define GUI_MAX_TABORDER 9999
#define GUI_PADDING 5 #define GUI_PADDING 5
#define GUI_PADDING_LEFT GUI_PADDING * 3 #define GUI_PADDING_LEFT GUI_PADDING * 3
#define GUI_SIDEBAR_WIDTH 110 #define GUI_SIDEBAR_WIDTH 150 // 110
#define GUI_PADDING_RIGHT GUI_PADDING * 3 #define GUI_PADDING_RIGHT GUI_PADDING * 3
#define GUI_PADDING_TOP GUI_PADDING #define GUI_PADDING_TOP GUI_PADDING
#define GUI_PADDING_BOTTOM GUI_PADDING #define GUI_PADDING_BOTTOM GUI_PADDING
@ -85,20 +84,12 @@ typedef struct _GUI
void* pAccPropServices; void* pAccPropServices;
HWND hAccLabel; HWND hAccLabel;
BOOL bShouldAnnounceSelected; BOOL bShouldAnnounceSelected;
WCHAR sectionNames[20][20]; WCHAR sectionNames[20][64];
BOOL bRebuildIfTabOrderIsEmpty; BOOL bRebuildIfTabOrderIsEmpty;
int dwPageLocation; int dwPageLocation;
DWORD last_section; DWORD last_section;
} GUI; } GUI;
static HRESULT GUI_AboutProc(
HWND hwnd,
UINT uNotification,
WPARAM wParam,
LPARAM lParam,
LONG_PTR lpRefData
);
static BOOL GUI_Build(HDC hDC, HWND hWnd); static BOOL GUI_Build(HDC hDC, HWND hWnd);
static LRESULT CALLBACK GUI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK GUI_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

30
ep_gui/dllmain.cpp

@ -0,0 +1,30 @@
#include <Windows.h>
extern "C"
{
HMODULE hModule = nullptr;
BOOL WINAPI DllMain(
_In_ HINSTANCE hinstDLL,
_In_ DWORD fdwReason,
_In_ LPVOID lpvReserved
)
{
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hinstDLL);
hModule = hinstDLL;
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
}

161
ep_gui/ep_gui.vcxproj

@ -0,0 +1,161 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{2351a0df-782c-4d74-85b7-0847d245d6b4}</ProjectGuid>
<RootNamespace>epgui</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;$(SolutionDir)\ep_weather_host;$(SolutionDir)\ep_weather_host\$(Platform)\$(Configuration);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;WINRT_NO_SOURCE_LOCATION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\ExplorerPatcher\fmemopen.c" />
<ClCompile Include="..\ExplorerPatcher\getline.c" />
<ClCompile Include="..\ExplorerPatcher\Localization.cpp" />
<ClCompile Include="..\ExplorerPatcher\utility.c" />
<ClCompile Include="..\ep_weather_host_stub\$(Platform)\$(Configuration)\ep_weather_host_i.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="GUI.h" />
<!--<ClInclude Include="GUI2.h" />-->
<ClInclude Include="pch.h" />
<ClInclude Include="resources\EPSettingsResources.h" />
<ClInclude Include="resources\EPSharedResources.h" />
<ClInclude Include="resources\resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="resources\ep_gui.rc" />
<ResourceCompile Include="resources\lang\ep_gui.*.rc" />
<ResourceCompile Include="..\ExplorerPatcher-L10N\resources\lang\ep_gui.*.rc" Condition="Exists('..\ExplorerPatcher-L10N\resources\lang')" />
</ItemGroup>
<ItemGroup>
<None Include="resources\settings.reg" />
<None Include="resources\settings10.reg" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="GUI.c" />
<!--<ClCompile Include="GUI2.cpp">
<PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>-->
<ClCompile Include="pch.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
</Target>
</Project>

1
ep_gui/pch.cpp

@ -0,0 +1 @@
#include "pch.h"

1
ep_gui/pch.h

@ -0,0 +1 @@
#pragma once

387
ep_gui/resources/EPSettingsResources.h

@ -0,0 +1,387 @@
#pragma once
// 1001 - 2200
#define IDS_TB 1001
#define IDS_TB_STYLE 1002
#define IDS_TB_STYLE_0 1003
#define IDS_TB_STYLE_1 1004
#define IDS_TB_MORE 1005
#define IDS_TB_CUSTOMIZETRAYICONS 1006
#define IDS_TB_CUSTOMIZESYSTEMICONS 1007
#define IDS_TB_PRIMARYTBPOS 1008
#define IDS_TB_POSBOTTOM 1009
#define IDS_TB_POSTOP 1010
#define IDS_TB_POSLEFT 1011
#define IDS_TB_POSRIGHT 1012
#define IDS_TB_SECONDARYTBPOS 1013
#define IDS_TB_EXTRABTN 1014
#define IDS_TB_EXTRABTN_0 1015
#define IDS_TB_EXTRABTN_2 1016
#define IDS_TB_EXTRABTN_1 1017
#define IDS_TB_SEARCHMODE_W11 1018
#define IDS_TB_SEARCHMODE 1019
#define IDS_TB_SEARCHMODE_0 1020
#define IDS_TB_SEARCHMODE_1 1021
#define IDS_TB_SEARCHMODE_2 1022
#define IDS_TB_CORTANABTN 1023
#define IDS_TB_TASKVIEWBTN 1024
#define IDS_TB_WIDGETSBTN 1025
#define IDS_TB_AUTOHIDETB 1026
#define IDS_TB_STARTBTNSTYLE 1027
#define IDS_TB_STARTBTNSTYLE_0 1028
#define IDS_TB_STARTBTNSTYLE_1 1029
#define IDS_TB_PRIMARYTBALIGN 1030
#define IDS_TB_TBALIGN_0 1031
#define IDS_TB_TBALIGN_1 1032
#define IDS_TB_TBALIGN_5 1033
#define IDS_TB_TBALIGN_3 1034
#define IDS_TB_TBALIGN_7 1035
#define IDS_TB_SECONDARYTBALIGN 1036
#define IDS_TB_PRIMARYTBGLOM 1037
#define IDS_TB_GLOM_0_D 1038
#define IDS_TB_GLOM_0 1039
#define IDS_TB_GLOM_1 1040
#define IDS_TB_GLOM_2 1042
#define IDS_TB_SECONDARYTBGLOM 1043
#define IDS_TB_ICONSIZE 1044
#define IDS_TB_ICONSIZE_1 1045
#define IDS_TB_ICONSIZE_0 1046
#define IDS_TB_STYLE_2 1047
#define IDS_TB_ALTIMPL_NOTICE 1048
#define IDS_TRAY 1101
#define IDS_TRAY_SKINMENUS 1102
#define IDS_TRAY_CENTERMENUS 1103
#define IDS_TRAY_FLYOUTMENUS 1104
#define IDS_TRAY_TOUCHKB 1105
#define IDS_TRAY_SHOWSECONDS 1106
#define IDS_TRAY_CCBTN 1107
#define IDS_TRAY_SHOWDESKTOPBTN 1108
#define IDS_TRAY_SHOWDESKTOPBTN_1 1109
#define IDS_TRAY_SHOWDESKTOPBTN_0 1110
#define IDS_TRAY_SHOWDESKTOPBTN_2 1111
#define IDS_TRAY_SKINICONS 1112
#define IDS_TRAY_REPLACENETWORK_L1 1113
#define IDS_TRAY_REPLACENETWORK_L2 1114
#define IDS_TRAY_REPLACENETWORK_0 1115
#define IDS_TRAY_REPLACENETWORK_1 1116
#define IDS_TRAY_REPLACENETWORK_2 1117
#define IDS_TRAY_SYSICONBEHAVIOR 1118
#define IDS_TRAY_NETWORK 1119
#define IDS_TRAY_NETWORK_6 1120
#define IDS_TRAY_NETWORK_5 1121
#define IDS_TRAY_NETWORK_0 1122
#define IDS_TRAY_NETWORK_2 1123
#define IDS_TRAY_NETWORK_1 1124
#define IDS_TRAY_SOUND 1125
#define IDS_TRAY_SOUND_1 1126
#define IDS_TRAY_SOUND_0 1127
#define IDS_TRAY_CLOCK 1128
#define IDS_TRAY_CLOCK_2 1129
#define IDS_TRAY_CLOCK_0 1130
#define IDS_TRAY_CLOCK_1 1131
#define IDS_TRAY_CLOCK_2_W10 1132
#define IDS_TRAY_BATTERY 1133
#define IDS_TRAY_BATTERY_0 1134
#define IDS_TRAY_BATTERY_1 1135
#define IDS_TRAY_LANGSWITCHER 1136
#define IDS_TRAY_LANGSWITCHER_0 1137
#define IDS_TRAY_LANGSWITCHER_1_21H2 1138
#define IDS_TRAY_LANGSWITCHER_7 1140
#define IDS_TRAY_LANGSWITCHER_1 1141
#define IDS_TRAY_LANGSWITCHER_4 1142
#define IDS_TRAY_OVERFLOWSTYLE 1143
#define IDS_TRAY_OVERFLOWSTYLE_0 1144
#define IDS_TRAY_OVERFLOWSTYLE_1 1145
#define IDS_EXP 1201
#define IDS_EXP_SHEXT_L1 1202
#define IDS_EXP_SHEXT_L2 1203
#define IDS_EXP_SHEXT_LEARN 1204
#define IDS_EXP_SHEXT_REGISTER 1205
#define IDS_EXP_DISABLECTXMENU 1206
#define IDS_EXP_LEGACYFTDIALOG 1207
#define IDS_EXP_CLASSICDRIVEGROUP 1208
#define IDS_EXP_CTRLINTF 1209
#define IDS_EXP_CTRLINTF_0_W11 1210
#define IDS_EXP_CTRLINTF_3 1211
#define IDS_EXP_CTRLINTF_4 1212
#define IDS_EXP_CTRLINTF_0_W10 1213
#define IDS_EXP_CTRLINTF_1_W11 1214
#define IDS_EXP_CTRLINTF_2 1215
#define IDS_EXP_NEWWINDOWS 1216
#define IDS_EXP_IMMERSIVEMENUS 1217
#define IDS_EXP_DISABLENAVBAR 1218
#define IDS_EXP_DISABLESEARCHBAR 1219
#define IDS_EXP_SHRINKADDRESSBAR 1220
#define IDS_EXP_HIDESEARCHBAR 1221
#define IDS_EXP_TITLEBAR 1222
#define IDS_EXP_TITLEBAR_0 1223
#define IDS_EXP_TITLEBAR_1 1224
#define IDS_EXP_TITLEBAR_2 1225
#define IDS_EXP_TITLEBAR_3 1226
#define IDS_EXP_MICA 1227
#define IDS_START 1301
#define IDS_START_STYLE 1302
#define IDS_START_STYLE_0 1303
#define IDS_START_STYLE_1 1304
#define IDS_START_MORE 1305
#define IDS_START_POSITION 1306
#define IDS_START_POSITION_0 1307
#define IDS_START_POSITION_1 1308
#define IDS_START_MAXFREQAPPS 1309
#define IDS_START_MAXFREQAPPS_0 1310
#define IDS_START_MAXFREQAPPS_6 1311
#define IDS_START_MAXFREQAPPS_99999 1312
#define IDS_START_MONITOROVERRIDE_L1 1313
#define IDS_START_MONITOROVERRIDE_L2 1314
#define IDS_START_MONITOROVERRIDE_1 1315
#define IDS_START_MONITOROVERRIDE_0 1316
#define IDS_START_MONITOROVERRIDE_2 1317
#define IDS_START_MONITOROVERRIDE_3 1318
#define IDS_START_MONITOROVERRIDE_4 1319
#define IDS_START_MONITOROVERRIDE_5 1320
#define IDS_START_MONITOROVERRIDE_6 1321
#define IDS_START_MONITOROVERRIDE_7 1322
#define IDS_START_MONITOROVERRIDE_8 1323
#define IDS_START_MONITOROVERRIDE_9 1324
#define IDS_START_NORECOMMENDED 1325
#define IDS_START_MAKEALLAPPSDEFAULT 1326
#define IDS_START_SHOWMORETILES 1327
#define IDS_START_CORNERPREF 1328
#define IDS_START_CORNERPREF_1 1329
#define IDS_START_CORNERPREF_2 1330
#define IDS_START_CORNERPREF_0 1331
#define IDS_START_DISPLAYMODE 1332
#define IDS_START_DISPLAYMODE_0 1333
#define IDS_START_DISPLAYMODE_1 1334
#define IDS_START_DISPLAYMODE_2 1335
#define IDS_START_APPLIST 1336
#define IDS_START_APPLIST_0 1337
#define IDS_START_APPLIST_3 1338
#define IDS_START_APPLIST_1 1339
#define IDS_START_NOTICE 1340
#define IDS_START_WIN10_NOTICE 1341
#define IDS_AT 1401
#define IDS_AT_STYLE 1402
#define IDS_AT_STYLE_0_W11 1403
#define IDS_AT_STYLE_0_W10 1404
#define IDS_AT_STYLE_3 1405
#define IDS_AT_STYLE_1 1406
#define IDS_AT_STYLE_2 1407
#define IDS_AT_SWS_INCLUDEWALLPAPER 1408
#define IDS_AT_SWS_PRIMARYONLY 1409
#define IDS_AT_SWS_PERMONITOR 1410
#define IDS_AT_SWS_GROUPWINDOWS 1411
#define IDS_AT_SWS_NOPERAPP 1412
#define IDS_AT_SWS_THEME 1413
#define IDS_AT_SWS_THEME_0 1414
#define IDS_AT_SWS_THEME_1 1415
#define IDS_AT_SWS_THEME_2 1416
#define IDS_AT_SWS_OPACITY 1417
#define IDS_AT_SWS_OPACITY_100 1418
#define IDS_AT_SWS_OPACITY_95 1419
#define IDS_AT_SWS_COLORSCHEME 1420
#define IDS_AT_SWS_COLORSCHEME_0 1421
#define IDS_AT_SWS_COLORSCHEME_1 1422
#define IDS_AT_SWS_COLORSCHEME_2 1423
#define IDS_AT_SWS_CORNERPREF 1424
#define IDS_AT_SWS_CORNERPREF_2 1425
#define IDS_AT_SWS_CORNERPREF_3 1426
#define IDS_AT_SWS_CORNERPREF_1 1427
#define IDS_AT_SWS_ROWHEIGHT 1428
#define IDS_AT_SWS_ROWHEIGHT_230 1429
#define IDS_AT_SWS_MAXWIDTH 1430
#define IDS_AT_SWS_MAXWIDTH_100 1431
#define IDS_AT_SWS_MAXWIDTH_80 1432
#define IDS_AT_SWS_MAXHEIGHT 1433
#define IDS_AT_SWS_MAXHEIGHT_100 1434
#define IDS_AT_SWS_MAXHEIGHT_80 1435
#define IDS_AT_SWS_PADDING 1436
#define IDS_AT_SWS_PADDING_20 1437
#define IDS_AT_SWS_PADDING_0 1438
#define IDS_AT_SWS_SHOWDELAY 1439
#define IDS_AT_SWS_SHOWDELAY_0 1440
#define IDS_AT_SWS_SHOWDELAY_25 1441
#define IDS_AT_SWS_SHOWDELAY_50 1442
#define IDS_AT_SWS_SHOWDELAY_75 1443
#define IDS_AT_SWS_SHOWDELAY_100 1444
#define IDS_AT_SWS_SHOWDELAY_125 1445
#define IDS_AT_SWS_SHOWDELAY_150 1446
#define IDS_AT_SWS_SHOWDELAY_200 1447
#define IDS_AT_SWS_SHOWDELAY_300 1448
#define IDS_AT_SWS_SHOWDELAY_400 1449
#define IDS_AT_SWS_SHOWDELAY_500 1450
#define IDS_AT_SWS_SCROLLWHEEL 1451
#define IDS_AT_SWS_SCROLLWHEEL_0 1452
#define IDS_AT_SWS_SCROLLWHEEL_1 1453
#define IDS_AT_SWS_SCROLLWHEEL_2 1454
#define IDS_AT_SWS_LEARN 1455
#define IDS_WEATHER 1501
#define IDS_WEATHER_SHOW 1502
#define IDS_WEATHER_LOC 1503
#define IDS_WEATHER_LOC_PROMPT 1504
#define IDS_WEATHER_LOC_DEFAULT 1505
#define IDS_WEATHER_LAYOUT 1506
#define IDS_WEATHER_LAYOUT_0 1507
#define IDS_WEATHER_LAYOUT_3 1508
#define IDS_WEATHER_LAYOUT_1 1509
#define IDS_WEATHER_LAYOUT_4 1510
#define IDS_WEATHER_LAYOUT_5 1511
#define IDS_WEATHER_SIZE 1512
#define IDS_WEATHER_SIZE_0 1513
#define IDS_WEATHER_SIZE_2 1514
#define IDS_WEATHER_SIZE_1 1515
#define IDS_WEATHER_POSITION 1516
#define IDS_WEATHER_POSITION_0 1517
#define IDS_WEATHER_POSITION_1 1518
#define IDS_WEATHER_UPDATEFREQ 1519
#define IDS_WEATHER_UPDATEFREQ_60 1520
#define IDS_WEATHER_UPDATEFREQ_300 1521
#define IDS_WEATHER_UPDATEFREQ_900 1522
#define IDS_WEATHER_UPDATEFREQ_1200 1523
#define IDS_WEATHER_UPDATEFREQ_1800 1524
#define IDS_WEATHER_UPDATEFREQ_3600 1525
#define IDS_WEATHER_UPDATEFREQ_7200 1526
#define IDS_WEATHER_TEMPUNIT 1527
#define IDS_WEATHER_TEMPUNIT_0 1528
#define IDS_WEATHER_TEMPUNIT_1 1529
#define IDS_WEATHER_LANG 1533
#define IDS_WEATHER_LANG_PROMPT 1534
#define IDS_WEATHER_LANG_DEFAULT 1535
#define IDS_WEATHER_COLORSCHEME 1536
#define IDS_WEATHER_COLORSCHEME_0 1537
#define IDS_WEATHER_COLORSCHEME_1 1538
#define IDS_WEATHER_COLORSCHEME_2 1539
#define IDS_WEATHER_CORNERPREF 1540
#define IDS_WEATHER_CORNERPREF_2 1541
#define IDS_WEATHER_CORNERPREF_3 1542
#define IDS_WEATHER_CORNERPREF_1 1543
#define IDS_WEATHER_ICONPACK 1544
#define IDS_WEATHER_ICONPACK_0 1545
#define IDS_WEATHER_ICONPACK_1 1546
#define IDS_WEATHER_CONTENTSMODE 1547
#define IDS_WEATHER_CONTENTSMODE_0 1548
#define IDS_WEATHER_CONTENTSMODE_1 1549
#define IDS_WEATHER_ZOOM 1550
#define IDS_WEATHER_ZOOM_100 1551
#define IDS_WEATHER_LEARN 1552
#define IDS_WEATHER_LASTUPDATE 1553
#define IDS_WEATHER_UPDATE 1554
#define IDS_WEATHER_CLEAR 1555
#define IDS_WEATHER_CLEAR_PROMPT 1556
#define IDS_WEATHER_CLEAR_WAIT 1557
#define IDS_WEATHER_CLEAR_SUCCESS 1558
#define IDS_WEATHER_CLEAR_FAILED 1559
#define IDS_SP 1601
#define IDS_SP_HIDEICON 1602
#define IDS_SP_DESKTOPMENU 1603
#define IDS_SP_DESKTOPMENU_0 1604
#define IDS_SP_DESKTOPMENU_32 1605
#define IDS_SP_DESKTOPMENU_48 1606
#define IDS_SP_DESKTOPMENU_288 1607
#define IDS_SP_DESKTOPMENU_800 1608
#define IDS_SP_DESKTOPMENU_304 1609
#define IDS_SP_DESKTOPMENU_816 1610
#define IDS_SP_DESKTOPMENU_1008 1611
#define IDS_SP_UPDATEFREQ 1612
#define IDS_SP_UPDATEFREQ_0 1613
#define IDS_SP_UPDATEFREQ_60 1614
#define IDS_SP_UPDATEFREQ_300 1615
#define IDS_SP_UPDATEFREQ_900 1616
#define IDS_SP_UPDATEFREQ_1200 1617
#define IDS_SP_UPDATEFREQ_1800 1618
#define IDS_SP_UPDATEFREQ_3600 1619
#define IDS_SP_UPDATEFREQ_7200 1620
#define IDS_SP_UPDATEFREQ_21600 1621
#define IDS_SP_UPDATEFREQ_43200 1622
#define IDS_SP_UPDATEFREQ_86400 1623
#define IDS_SP_MOREOPTIONS 1624
#define IDS_OTHER 1701
#define IDS_OTHER_REMEMBERLAST 1702
#define IDS_OTHER_CLOCKFLYOUT 1703
#define IDS_OTHER_TOOLBARSEPARATORS 1704
#define IDS_OTHER_WINXPROPERTIES 1705
#define IDS_OTHER_DONTUSEPOWERSHELL 1706
#define IDS_OTHER_WINXACCELERATOR 1707
#define IDS_OTHER_DISABLEOFFICE 1708
#define IDS_OTHER_DISABLEWINF 1709
#define IDS_OTHER_DISABLERC 1710
#define IDS_OTHER_DISABLEAEROSNAP 1711
#define IDS_OTHER_SNAPASSISTSTYLE 1712
#define IDS_OTHER_SNAPASSISTSTYLE_0 1713
#define IDS_OTHER_SNAPASSISTSTYLE_3 1714
#define IDS_OTHER_PWRBTNACTION 1715
#define IDS_OTHER_PWRBTNACTION_256 1716
#define IDS_OTHER_PWRBTNACTION_1 1717
#define IDS_OTHER_PWRBTNACTION_16 1718
#define IDS_OTHER_PWRBTNACTION_64 1719
#define IDS_OTHER_PWRBTNACTION_2 1720
#define IDS_OTHER_PWRBTNACTION_4 1721
#define IDS_OTHER_NOREDIRECT 1722
#define IDS_OTHER_NOREDIRECT_SYSTEM 1723
#define IDS_OTHER_NOREDIRECT_PROGRAMS 1724
#define IDS_OTHER_NOREDIRECT_DATETIME 1725
#define IDS_OTHER_NOREDIRECT_TRAYICONS 1726
#define IDS_OTHER_LOGONLOGOFFSHUTDOWNSOUNDS 1727
#define IDS_UPDATES 1801
#define IDS_UPDATES_POLICY 1802
#define IDS_UPDATES_POLICY_1 1803
#define IDS_UPDATES_POLICY_0 1804
#define IDS_UPDATES_POLICY_2 1805
#define IDS_UPDATES_PREFER_STAGING 1806
#define IDS_UPDATES_DOWNGRADES 1807
#define IDS_UPDATES_UPDATESERVERS 1808
#define IDS_UPDATES_RELEASES 1809
#define IDS_UPDATES_RELEASES_PROMPT 1810
#define IDS_UPDATES_STAGING 1811
#define IDS_UPDATES_STAGING_PROMPT 1812
#define IDS_UPDATES_CHECK 1813
#define IDS_UPDATES_INSTALL 1814
#define IDS_UPDATES_CHANGES 1815
#define IDS_UPDATES_LEARN 1816
#define IDS_UPDATES_USELOCAL 1817
#define IDS_ADV 1901
#define IDS_ADV_DISCLAIMER 1902
#define IDS_ADV_LEARN 1903
#define IDS_ADV_CONSOLE 1904
#define IDS_ADV_MEMCHECK 1905
#define IDS_ADV_AUTOHIDE 1906
#define IDS_ADV_PAINTDESKTOPVERSION 1907
#define IDS_ADV_CLASSICTHEME 1908
#define IDS_ADV_SYSLISTVIEW32 1909
#define IDS_ADV_NOPROPERTIES 1910
#define IDS_ADV_SYMBOLS 1911
#define IDS_ADV_PINNEDITEMS 1912
#define IDS_ADV_REMOVEEXTRAGAP 1913
#define IDS_ADV_XAMLSOUNDS 1927
#define IDS_ABOUT 2001
#define IDS_ABOUT_VERSION 2002
#define IDS_ABOUT_PROJECT 2003
#define IDS_ABOUT_AUTHOR 2004
#define IDS_ABOUT_OS 2005
#define IDS_ABOUT_GITHUB 2006
#define IDS_ABOUT_WEBSITE 2007
#define IDS_ABOUT_DONATE 2009
#define IDS_ABOUT_FAQ 2010
#define IDS_ABOUT_SETTINGS 2011
#define IDS_ABOUT_IMPORT 2012
#define IDS_ABOUT_EXPORT 2013
#define IDS_ABOUT_EXPORT_SUCCESS 2014
#define IDS_ABOUT_RESET 2015
#define IDS_UNINSTALL 2101
#define IDS_UNINSTALL_UNINSTALL 2102
#define IDS_FOOTER_RESTART 2201
#define IDS_MAINTENANCE 2301

39
ep_gui/resources/EPSharedResources.h

@ -0,0 +1,39 @@
#pragma once
// 301-350
#define IDS_UPDATES_CHECKING_T 301
#define IDS_UPDATES_AVAILABLE_T 302
#define IDS_UPDATES_AVAILABLE_T_U 303
#define IDS_UPDATES_AVAILABLE_B 304
#define IDS_UPDATES_ISLATEST_T 305
#define IDS_UPDATES_ISLATEST_B 306
#define IDS_UPDATES_CHECKFAILED_T 307
#define IDS_UPDATES_CHECKFAILED_B 308
#define IDS_UPDATES_DOWNLOADING_T 309
#define IDS_UPDATES_SUCCESS_T 310
#define IDS_UPDATES_DLFAILED_T 311
#define IDS_UPDATES_DLFAILED_B 312
#define IDS_UPDATES_INSTALLEDVER 313
#define IDS_UPDATES_PROMPT 314
#define IDS_UPDATES_AVAILABLE_A 315
#define IDS_UPDATES_DOWNLOADING_0 316
// 351-400
#define IDS_SYM_DL_T 351
#define IDS_SYM_DL_B 352
#define IDS_SYM_SUCCESS_T 353
#define IDS_SYM_SUCCESS_B 354
#define IDS_SYM_FAILEDSOME_T 355
#define IDS_SYM_FAILEDSOME_B 356
#define IDS_SYM_FAILEDALL_T 357
#define IDS_SYM_FAILEDALL_B 358
// 401-500
#define IDS_CRASH_TITLE 401
#define IDS_CRASH_BODY 402
#define IDS_CRASH_ONCE 403
#define IDS_CRASH_MULTIPLE 404
#define IDS_CRASH_DISMISS 405

121
ep_gui/resources/ep_gui.rc

@ -0,0 +1,121 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (United States) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#include "..\version.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION VER_FILE
PRODUCTVERSION VER_PRODUCT
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "VALINET Solutions SRL"
VALUE "FileDescription", "ExplorerPatcher Settings"
VER_FILE_STRING
VALUE "InternalName", "ep_gui.dll"
VALUE "LegalCopyright", "Copyright (C) 2006-2025 VALINET Solutions SRL. All rights reserved."
VALUE "OriginalFilename", "ep_gui.dll"
VALUE "ProductName", "ExplorerPatcher"
VER_PRODUCT_STRING
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
/////////////////////////////////////////////////////////////////////////////
//
// RCDATA
//
IDR_REGISTRY1 RCDATA "resources\settings.reg"
IDR_REGISTRY2 RCDATA "resources\settings10.reg"
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
IDS_PRODUCTNAME "ExplorerPatcher"
END
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

434
ep_gui/resources/lang/ep_gui.en-US.rc

@ -0,0 +1,434 @@
#include "resources/resource.h"
#include "winres.h"
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
STRINGTABLE
BEGIN
IDS_UPDATES_CHECKING_T "Checking for updates…"
IDS_UPDATES_AVAILABLE_T "Version %d.%d.%d.%d is available"
IDS_UPDATES_AVAILABLE_T_U "New version available"
IDS_UPDATES_AVAILABLE_B "Click here to learn more about this update."
IDS_UPDATES_AVAILABLE_A "Update now"
IDS_UPDATES_ISLATEST_T "No updates are available"
IDS_UPDATES_ISLATEST_B "Please check back later."
IDS_UPDATES_CHECKFAILED_T "Unable to check for updates"
IDS_UPDATES_CHECKFAILED_B "Make sure that you are connected to the Internet and that the remote server is online."
IDS_UPDATES_DOWNLOADING_T "Downloading and installing updates…"
IDS_UPDATES_DOWNLOADING_0 "Preparing…"
IDS_UPDATES_SUCCESS_T "Update successful"
IDS_UPDATES_DLFAILED_T "Update failed"
IDS_UPDATES_DLFAILED_B "The user has cancelled the process or an error has occured when attempting to install this update."
IDS_UPDATES_INSTALLEDVER "Installed version: %d.%d.%d.%d"
IDS_UPDATES_PROMPT "Would you like to install an update for ExplorerPatcher?\n\nDownloaded from:\n%s"
IDS_SYM_DL_T "Downloading symbols for OS build %s, please wait…"
IDS_SYM_DL_B "This may take several minutes. For now, ExplorerPatcher may have limited and/or broken functionality. Click here to learn more about symbols."
IDS_SYM_SUCCESS_T "Successfully downloaded symbols for OS build %s"
IDS_SYM_SUCCESS_B "Please restart File Explorer to restore proper functionality."
IDS_SYM_FAILEDSOME_T "Downloaded some symbols for OS build %s"
IDS_SYM_FAILEDSOME_B "Some other symbols could not be downloaded. This may be due to the current OS build being too recent or the Internet connection being unstable."
IDS_SYM_FAILEDALL_T "Failed to download symbols for OS build %s"
IDS_SYM_FAILEDALL_B "No symbols could be downloaded for this build. This may be due to the current OS build being too recent or the Internet connection being unavailable or unstable."
IDS_CRASH_TITLE "Unfortunately, File Explorer is crashing :("
IDS_CRASH_BODY "It seems that File Explorer closed unexpectedly %1$s in less than %2$d seconds each time when starting up. This might indicate a problem caused by ExplorerPatcher, which might be unaware of recent changes in Windows, for example when running on a new OS build.\nHere are a few recommendations:\n• If an updated version is available, you can <A HREF=""%3$s"">update ExplorerPatcher and restart File Explorer</A>.\n• On GitHub, you can <A HREF=""%4$s"">view releases</A>, <A HREF=""%5$s"">check the current status</A>, <A HREF=""%6$s"">discuss</A> or <A HREF=""%7$s"">review the latest issues</A>.\n• If you suspect this is not caused by ExplorerPatcher, please uninstall any recently installed shell extensions or similar utilities.\n• If no fix is available for the time being, you can <A HREF=""%8$s"">uninstall ExplorerPatcher</A>, and then later reinstall it when a fix is published on GitHub. Rest assured, even if you uninstall, your program configuration will be preserved.\n\nI am sorry for the inconvenience this might cause; I am doing my best to try to keep this program updated and working.\n\nExplorerPatcher is disabled until the next File Explorer restart, in order to allow you to perform maintenance tasks and take the necessary actions."
IDS_CRASH_ONCE "once"
IDS_CRASH_MULTIPLE "%d times"
IDS_CRASH_DISMISS "Dismiss"
IDS_TB "Taskbar"
IDS_TB_STYLE "Taskbar style"
IDS_TB_STYLE_0 "Windows 11 (default)"
IDS_TB_STYLE_1 "Windows 10"
IDS_TB_STYLE_2 "Windows 10 (ExplorerPatcher)"
IDS_TB_MORE "More taskbar options in the Settings app"
IDS_TB_CUSTOMIZETRAYICONS "Customize notification area icons"
IDS_TB_CUSTOMIZESYSTEMICONS "Customize system icons in the notification area"
IDS_TB_PRIMARYTBPOS "Primary taskbar location on screen"
IDS_TB_POSBOTTOM "Bottom (default)"
IDS_TB_POSTOP "Top"
IDS_TB_POSLEFT "Left"
IDS_TB_POSRIGHT "Right"
IDS_TB_SECONDARYTBPOS "Secondary taskbar(s) location on screen"
IDS_TB_EXTRABTN "Extra button should be"
IDS_TB_EXTRABTN_0 "Hidden (default)"
IDS_TB_EXTRABTN_2 "Shown and open Cortana"
IDS_TB_EXTRABTN_1 "Shown and open Widgets"
IDS_TB_SEARCHMODE_W11 "Show Search button"
IDS_TB_SEARCHMODE "Search"
IDS_TB_SEARCHMODE_0 "Hidden"
IDS_TB_SEARCHMODE_1 "Show search icon"
IDS_TB_SEARCHMODE_2 "Show search box"
IDS_TB_CORTANABTN "Show Cortana button"
IDS_TB_TASKVIEWBTN "Show Task view button"
IDS_TB_WIDGETSBTN "Show Widgets button"
IDS_TB_AUTOHIDETB "Automatically hide the taskbar"
IDS_TB_STARTBTNSTYLE "Start button style"
IDS_TB_STARTBTNSTYLE_0 "Windows 10 (default)"
IDS_TB_STARTBTNSTYLE_1 "Windows 11"
IDS_TB_PRIMARYTBALIGN "Primary taskbar alignment"
IDS_TB_TBALIGN_0 "At screen edge (default)"
IDS_TB_TBALIGN_1 "Centered"
IDS_TB_TBALIGN_5 "Centered, at screen edge when full"
IDS_TB_TBALIGN_3 "Centered with Start button"
IDS_TB_TBALIGN_7 "Centered with Start button, at screen edge when full"
IDS_TB_SECONDARYTBALIGN "Secondary taskbar(s) alignment"
IDS_TB_PRIMARYTBGLOM "Combine taskbar icons on primary taskbar"
IDS_TB_GLOM_0_D "Always combine (default)"
IDS_TB_GLOM_0 "Always combine"
IDS_TB_GLOM_1 "Combine when taskbar is full"
IDS_TB_GLOM_2 "Never combine"
IDS_TB_SECONDARYTBGLOM "Combine taskbar icons on secondary taskbar(s)"
IDS_TB_ICONSIZE "Taskbar icon size"
IDS_TB_ICONSIZE_1 "Small"
IDS_TB_ICONSIZE_0 "Large (default)"
IDS_TB_ALTIMPL_NOTICE "Important notice regarding ExplorerPatcher's taskbar implementation (online)"
IDS_TRAY "System tray"
IDS_TRAY_SKINMENUS "Skin taskbar and tray pop-up menus"
IDS_TRAY_CENTERMENUS "Center tray icon pop-up menus"
IDS_TRAY_FLYOUTMENUS "Flyout behavior for tray icon pop-up menus"
IDS_TRAY_TOUCHKB "Show touch keyboard button"
IDS_TRAY_SHOWSECONDS "Show seconds in the clock"
IDS_TRAY_CCBTN "Control Center button"
IDS_TRAY_SHOWDESKTOPBTN "Show desktop button"
IDS_TRAY_SHOWDESKTOPBTN_1 "Enabled (default)"
IDS_TRAY_SHOWDESKTOPBTN_0 "Disabled"
IDS_TRAY_SHOWDESKTOPBTN_2 "Hidden"
IDS_TRAY_SKINICONS "Apply Windows 11 style to system tray icons"
IDS_TRAY_OVERFLOWSTYLE "Hidden icons popup style"
IDS_TRAY_OVERFLOWSTYLE_0 "Windows 10 (default)"
IDS_TRAY_OVERFLOWSTYLE_1 "Windows 11"
IDS_TRAY_REPLACENETWORK_L1 "Choosing 'Open Network && Internet settings' when right clicking the"
IDS_TRAY_REPLACENETWORK_L2 "network icon should open"
IDS_TRAY_REPLACENETWORK_0 "Network section in the Settings app (default)"
IDS_TRAY_REPLACENETWORK_1 "Network and Sharing Center in Control Panel"
IDS_TRAY_REPLACENETWORK_2 "Network Connections in Control Panel"
IDS_TRAY_SYSICONBEHAVIOR "When clicking a system icon in the system tray, open:"
IDS_TRAY_NETWORK "Network"
IDS_TRAY_NETWORK_6 "Control Center"
IDS_TRAY_NETWORK_5 "Windows 11 WiFi flyout"
IDS_TRAY_NETWORK_0 "Windows 10 flyout (default)"
IDS_TRAY_NETWORK_2 "Windows 8 flyout"
IDS_TRAY_NETWORK_1 "Network section in the Settings app"
IDS_TRAY_SOUND "Sound"
IDS_TRAY_SOUND_1 "Windows 10 flyout (default)"
IDS_TRAY_SOUND_0 "Windows 7 flyout"
IDS_TRAY_CLOCK "Clock"
IDS_TRAY_CLOCK_2 "Windows 11 flyout"
IDS_TRAY_CLOCK_0 "Windows 10 flyout (default)"
IDS_TRAY_CLOCK_1 "Windows 7"
IDS_TRAY_CLOCK_2_W10 "Action Center"
IDS_TRAY_BATTERY "Battery"
IDS_TRAY_BATTERY_0 "Windows 10 flyout (default)"
IDS_TRAY_BATTERY_1 "Windows 7"
IDS_TRAY_LANGSWITCHER "Language switcher"
IDS_TRAY_LANGSWITCHER_0 "Windows 11 (default)"
IDS_TRAY_LANGSWITCHER_1_21H2 "Windows 10 (with link to ""Language Preferences"")"
IDS_TRAY_LANGSWITCHER_7 "Windows 10"
IDS_TRAY_LANGSWITCHER_1 "Windows 10 (with link to ""Language Preferences"") (no animation)"
IDS_TRAY_LANGSWITCHER_4 "Windows 10 (no animation)"
IDS_EXP "File Explorer"
IDS_EXP_SHEXT_L1 "For the settings marked with (**) to work in Open or Save file dialogs as well, register"
IDS_EXP_SHEXT_L2 "this utility as shell extension using the option below."
IDS_EXP_SHEXT_LEARN "Learn more"
IDS_EXP_SHEXT_REGISTER "Register as shell extension"
IDS_EXP_DISABLECTXMENU "Disable the Windows 11 context menu"
IDS_EXP_LEGACYFTDIALOG "Always use legacy file transfer dialog"
IDS_EXP_CLASSICDRIVEGROUP "Use classic drive groupings in This PC"
IDS_EXP_CTRLINTF "Control Interface"
IDS_EXP_CTRLINTF_0_W11 "Windows 11 Command Bar (default)"
IDS_EXP_CTRLINTF_0_W10 "Windows 10 Ribbon (default)"
IDS_EXP_CTRLINTF_1_W11 "Windows 10 Ribbon"
IDS_EXP_CTRLINTF_2 "Windows 7 Command Bar"
IDS_EXP_CTRLINTF_3 "Windows 11 Command Bar (no Tabs, classic Address Bar)"
IDS_EXP_CTRLINTF_4 "Windows 11 Command Bar (classic Address Bar)"
IDS_EXP_NEWWINDOWS "The following settings take effect on newly created File Explorer windows:"
IDS_EXP_IMMERSIVEMENUS "Use immersive menus when displaying Windows 10 context menus"
IDS_EXP_DISABLENAVBAR "Disable navigation bar"
IDS_EXP_DISABLESEARCHBAR "Disable modern search bar"
IDS_EXP_SHRINKADDRESSBAR "Shrink address bar height"
IDS_EXP_HIDESEARCHBAR "Hide search bar completely"
IDS_EXP_TITLEBAR "Title bar"
IDS_EXP_TITLEBAR_0 "Show icon and title (default)"
IDS_EXP_TITLEBAR_1 "Hide title, show icon"
IDS_EXP_TITLEBAR_2 "Hide icon, show title"
IDS_EXP_TITLEBAR_3 "Hide icon and title"
IDS_EXP_MICA "Apply Mica effect to the navigation bar of Windows 7 Explorer windows"
IDS_START "Start menu"
IDS_START_STYLE "Start menu style"
IDS_START_STYLE_0 "Windows 11 (default)"
IDS_START_STYLE_1 "Windows 10"
IDS_START_MORE "More Start menu options in the Settings app"
IDS_START_POSITION "Position on screen"
IDS_START_POSITION_0 "At screen edge"
IDS_START_POSITION_1 "Center (default)"
IDS_START_MAXFREQAPPS "Maximum number of frequent apps to show"
IDS_START_MAXFREQAPPS_0 "None"
IDS_START_MAXFREQAPPS_6 "6 (default)"
IDS_START_MAXFREQAPPS_99999 "Unlimited"
IDS_START_MONITOROVERRIDE_L1 "When using multiple displays, open Start on this monitor when invoked using"
IDS_START_MONITOROVERRIDE_L2 "the keyboard"
IDS_START_MONITOROVERRIDE_1 "Primary monitor (default)"
IDS_START_MONITOROVERRIDE_0 "Monitor on which the cursor is on"
IDS_START_MONITOROVERRIDE_2 "Monitor #2"
IDS_START_MONITOROVERRIDE_3 "Monitor #3"
IDS_START_MONITOROVERRIDE_4 "Monitor #4"
IDS_START_MONITOROVERRIDE_5 "Monitor #5"
IDS_START_MONITOROVERRIDE_6 "Monitor #6"
IDS_START_MONITOROVERRIDE_7 "Monitor #7"
IDS_START_MONITOROVERRIDE_8 "Monitor #8"
IDS_START_MONITOROVERRIDE_9 "Monitor #9"
IDS_START_NORECOMMENDED "Disable the ""Recommended"" section"
IDS_START_MAKEALLAPPSDEFAULT "Open Start in All apps by default"
IDS_START_SHOWMORETILES "Show more tiles"
IDS_START_CORNERPREF "Corner preference"
IDS_START_CORNERPREF_1 "Rounded corners, floating menu"
IDS_START_CORNERPREF_2 "Rounded corners, docked menu"
IDS_START_CORNERPREF_0 "Not rounded"
IDS_START_DISPLAYMODE "Display mode"
IDS_START_DISPLAYMODE_0 "Default"
IDS_START_DISPLAYMODE_1 "Start menu"
IDS_START_DISPLAYMODE_2 "Full screen Start"
IDS_START_APPLIST "App list"
IDS_START_APPLIST_0 "Display"
IDS_START_APPLIST_3 "Hide"
IDS_START_APPLIST_1 "Disable"
IDS_START_NOTICE "IMPORTANT, MUST READ: Notice regarding this feature (online)"
IDS_START_WIN10_NOTICE "Some settings might not be available in older Windows 10 versions."
IDS_AT "Window switcher"
IDS_AT_STYLE "Window switcher (Alt+Tab) style"
IDS_AT_STYLE_0_W11 "Windows 11 (default)"
IDS_AT_STYLE_0_W10 "Windows 10 (default)"
IDS_AT_STYLE_3 "Windows 10"
IDS_AT_STYLE_1 "Windows NT"
IDS_AT_STYLE_2 "Simple Window Switcher"
IDS_AT_SWS_INCLUDEWALLPAPER "Show the desktop as the last window in the interaction list"
IDS_AT_SWS_PRIMARYONLY "Always display switcher on primary monitor"
IDS_AT_SWS_PERMONITOR "Display windows only from the monitor containing the cursor"
IDS_AT_SWS_GROUPWINDOWS "Group windows of the same app"
IDS_AT_SWS_NOPERAPP "Disable the interaction list for individual apps ( Alt + %c )"
IDS_AT_SWS_THEME "Theme"
IDS_AT_SWS_THEME_0 "Default"
IDS_AT_SWS_THEME_1 "Acrylic"
IDS_AT_SWS_THEME_2 "Mica (always opaque)"
IDS_AT_SWS_OPACITY "Opacity"
IDS_AT_SWS_OPACITY_100 "Opaque"
IDS_AT_SWS_OPACITY_95 "95 % (default)"
IDS_AT_SWS_COLORSCHEME "Color scheme"
IDS_AT_SWS_COLORSCHEME_0 "Follow system setting (default)"
IDS_AT_SWS_COLORSCHEME_1 "Light"
IDS_AT_SWS_COLORSCHEME_2 "Dark"
IDS_AT_SWS_CORNERPREF "Corner preference"
IDS_AT_SWS_CORNERPREF_2 "Rounded (default)"
IDS_AT_SWS_CORNERPREF_3 "Small rounded"
IDS_AT_SWS_CORNERPREF_1 "Not rounded"
IDS_AT_SWS_ROWHEIGHT "Row height"
IDS_AT_SWS_ROWHEIGHT_230 "230 pt (default)"
IDS_AT_SWS_MAXWIDTH "Maximum width (percentage of screen width)"
IDS_AT_SWS_MAXWIDTH_100 "100 % (not recommended)"
IDS_AT_SWS_MAXWIDTH_80 "80 % (default)"
IDS_AT_SWS_MAXHEIGHT "Maximum height (percentage of screen height)"
IDS_AT_SWS_MAXHEIGHT_100 "100 % (not recommended)"
IDS_AT_SWS_MAXHEIGHT_80 "80 % (default)"
IDS_AT_SWS_PADDING "Window padding"
IDS_AT_SWS_PADDING_20 "20 pt (default)"
IDS_AT_SWS_PADDING_0 "None"
IDS_AT_SWS_SHOWDELAY "Show delay"
IDS_AT_SWS_SHOWDELAY_0 "None"
IDS_AT_SWS_SHOWDELAY_25 "25 ms"
IDS_AT_SWS_SHOWDELAY_50 "50 ms"
IDS_AT_SWS_SHOWDELAY_75 "75 ms"
IDS_AT_SWS_SHOWDELAY_100 "100 ms (default)"
IDS_AT_SWS_SHOWDELAY_125 "125 ms"
IDS_AT_SWS_SHOWDELAY_150 "150 ms"
IDS_AT_SWS_SHOWDELAY_200 "200 ms"
IDS_AT_SWS_SHOWDELAY_300 "300 ms"
IDS_AT_SWS_SHOWDELAY_400 "400 ms"
IDS_AT_SWS_SHOWDELAY_500 "500 ms"
IDS_AT_SWS_SCROLLWHEEL "Use the scroll wheel to change selection"
IDS_AT_SWS_SCROLLWHEEL_0 "Never (default)"
IDS_AT_SWS_SCROLLWHEEL_1 "When cursor is over the switcher"
IDS_AT_SWS_SCROLLWHEEL_2 "Always"
IDS_AT_SWS_LEARN "Learn more about Simple Window Switcher"
IDS_WEATHER "Weather"
IDS_WEATHER_SHOW "Show Weather on the taskbar"
IDS_WEATHER_LOC "Location"
IDS_WEATHER_LOC_PROMPT "Search City or Zip Code; the program looks up ""weather in /* what you typed */"" on Google. Leave blank for the default value (current location)."
IDS_WEATHER_LOC_DEFAULT "Current location (default)"
IDS_WEATHER_LAYOUT "Layout"
IDS_WEATHER_LAYOUT_0 "Icon and description (default)"
IDS_WEATHER_LAYOUT_3 "Icon and temperature"
IDS_WEATHER_LAYOUT_1 "Icon only"
IDS_WEATHER_LAYOUT_4 "Temperature only"
IDS_WEATHER_LAYOUT_5 "Temperature and description"
IDS_WEATHER_SIZE "Widget size"
IDS_WEATHER_SIZE_0 "Automatic (fit contents) (default)"
IDS_WEATHER_SIZE_2 "Automatic (fit contents) with threshold"
IDS_WEATHER_SIZE_1 "Fixed"
IDS_WEATHER_POSITION "Widget position"
IDS_WEATHER_POSITION_0 "Right / bottom (default)"
IDS_WEATHER_POSITION_1 "Left / top"
IDS_WEATHER_UPDATEFREQ "Update frequency"
IDS_WEATHER_UPDATEFREQ_60 "Every minute"
IDS_WEATHER_UPDATEFREQ_300 "Every 5 minutes"
IDS_WEATHER_UPDATEFREQ_900 "Every 15 minutes"
IDS_WEATHER_UPDATEFREQ_1200 "Every 20 minutes (default)"
IDS_WEATHER_UPDATEFREQ_1800 "Every half an hour"
IDS_WEATHER_UPDATEFREQ_3600 "Every hour"
IDS_WEATHER_UPDATEFREQ_7200 "Every couple of hours"
IDS_WEATHER_TEMPUNIT "Temperature unit"
IDS_WEATHER_TEMPUNIT_0 "Celsius (default)"
IDS_WEATHER_TEMPUNIT_1 "Fahrenheit"
IDS_WEATHER_LANG "Language"
IDS_WEATHER_LANG_PROMPT "Type the short code for the language you'd like the weather data to be displayed in. For example, try ""en"", ""ro"", ""de"", ""fr"" etc. Leave blank for the default value (language of the Windows OS)."
IDS_WEATHER_LANG_DEFAULT "System language (default)"
IDS_WEATHER_COLORSCHEME "Color scheme"
IDS_WEATHER_COLORSCHEME_0 "Follow system setting (default)"
IDS_WEATHER_COLORSCHEME_1 "Light"
IDS_WEATHER_COLORSCHEME_2 "Dark"
IDS_WEATHER_CORNERPREF "Corner preference"
IDS_WEATHER_CORNERPREF_2 "Rounded (default)"
IDS_WEATHER_CORNERPREF_3 "Small rounded"
IDS_WEATHER_CORNERPREF_1 "Not rounded"
IDS_WEATHER_ICONPACK "Icon pack"
IDS_WEATHER_ICONPACK_0 "Microsoft (default)"
IDS_WEATHER_ICONPACK_1 "Google"
IDS_WEATHER_CONTENTSMODE "Display widget contents"
IDS_WEATHER_CONTENTSMODE_0 "On a single line (default)"
IDS_WEATHER_CONTENTSMODE_1 "On 2 lines, if possible"
IDS_WEATHER_ZOOM "Zoom"
IDS_WEATHER_ZOOM_100 "100 % (default)"
IDS_WEATHER_LEARN "Learn more about the Weather taskbar widget"
IDS_WEATHER_LASTUPDATE "Last updated on: %s, %s."
IDS_WEATHER_UPDATE "Update weather now"
IDS_WEATHER_CLEAR "Clear weather widget local data"
IDS_WEATHER_CLEAR_PROMPT "Are you sure you want to permanently clear the weather widget's local data?\n\nThis will reset the internal components to their default state, but will preserve your preferences. This may fix the widget not loading the data properly, or having layout issues etc."
IDS_WEATHER_CLEAR_WAIT "Please wait…"
IDS_WEATHER_CLEAR_SUCCESS "Weather widget data cleared successfully."
IDS_WEATHER_CLEAR_FAILED "An error has occured while clearing the data."
IDS_SP "Spotlight"
IDS_SP_HIDEICON "Hide the ""Learn about this picture"" icon"
IDS_SP_DESKTOPMENU "Desktop context menu items"
IDS_SP_DESKTOPMENU_0 "No items"
IDS_SP_DESKTOPMENU_32 "Switch to the next picture"
IDS_SP_DESKTOPMENU_48 "Learn about and switch to next picture"
IDS_SP_DESKTOPMENU_288 "Info and switch to next picture"
IDS_SP_DESKTOPMENU_800 "Info, copyright, and switch to next picture"
IDS_SP_DESKTOPMENU_304 "Info, learn about, and switch to next picture"
IDS_SP_DESKTOPMENU_816 "Info, copyright, learn about, and switch to next picture"
IDS_SP_DESKTOPMENU_1008 "All items"
IDS_SP_UPDATEFREQ "Update frequency"
IDS_SP_UPDATEFREQ_0 "Let Windows decide the best schedule (default)"
IDS_SP_UPDATEFREQ_60 "Every minute"
IDS_SP_UPDATEFREQ_300 "Every 5 minutes"
IDS_SP_UPDATEFREQ_900 "Every 15 minutes"
IDS_SP_UPDATEFREQ_1200 "Every 20 minutes"
IDS_SP_UPDATEFREQ_1800 "Every half an hour"
IDS_SP_UPDATEFREQ_3600 "Every hour"
IDS_SP_UPDATEFREQ_7200 "Every couple of hours"
IDS_SP_UPDATEFREQ_21600 "Every 6 hours"
IDS_SP_UPDATEFREQ_43200 "Every 12 hours"
IDS_SP_UPDATEFREQ_86400 "Once a day"
IDS_SP_MOREOPTIONS "Show more options"
IDS_OTHER "Other"
IDS_OTHER_REMEMBERLAST "Remember last used section in this window"
IDS_OTHER_CLOCKFLYOUT "Open clock flyout when pressing Win+C instead of Microsoft Teams"
IDS_OTHER_TOOLBARSEPARATORS "Show separators between taskbar toolbars"
IDS_OTHER_WINXPROPERTIES "Add shortcut to program settings in Win+X menu"
IDS_OTHER_DONTUSEPOWERSHELL "Show Command Prompt instead of PowerShell in Win+X menu"
IDS_OTHER_WINXACCELERATOR "Remove shortcut key from program settings item in Win+X menu"
IDS_OTHER_DISABLEOFFICE "Disable Office hotkeys (Ctrl+Alt+Shift+Windows key combinations)"
IDS_OTHER_DISABLEWINF "Disable Win+F (Feedback Hub) hotkey"
IDS_OTHER_DISABLERC "Disable rounded corners for application windows"
IDS_OTHER_DISABLEAEROSNAP "Disable quadrants when snapping windows"
IDS_OTHER_SNAPASSISTSTYLE "Snap Assist style"
IDS_OTHER_SNAPASSISTSTYLE_0 "Windows 11 (default)"
IDS_OTHER_SNAPASSISTSTYLE_3 "Windows 10"
IDS_OTHER_PWRBTNACTION "Default action in the Alt+F4 dialog on the desktop"
IDS_OTHER_PWRBTNACTION_256 "Switch user"
IDS_OTHER_PWRBTNACTION_1 "Sign out"
IDS_OTHER_PWRBTNACTION_16 "Sleep"
IDS_OTHER_PWRBTNACTION_64 "Hibernate"
IDS_OTHER_PWRBTNACTION_2 "Shut down (default)"
IDS_OTHER_PWRBTNACTION_4 "Restart"
IDS_OTHER_LOGONLOGOFFSHUTDOWNSOUNDS "Enable logon, logoff, and shutdown sounds"
IDS_OTHER_NOREDIRECT "Prevent the following Control Panel links from being redirected to the Settings app:"
IDS_OTHER_NOREDIRECT_SYSTEM "System / About page"
IDS_OTHER_NOREDIRECT_PROGRAMS "Programs and Features"
IDS_OTHER_NOREDIRECT_DATETIME "Adjust date/time"
IDS_OTHER_NOREDIRECT_TRAYICONS "Customize notification icons"
IDS_UPDATES "Updates"
IDS_UPDATES_POLICY "When File Explorer starts"
IDS_UPDATES_POLICY_1 "Notify about available updates (default)"
IDS_UPDATES_POLICY_0 "Prompt to install available updates"
IDS_UPDATES_POLICY_2 "Do not check for updates"
IDS_UPDATES_PREFER_STAGING "Receive pre-release versions, if available (not recommended)"
IDS_UPDATES_DOWNGRADES "Suggest the latest version on the server, even if it's older (not recommended)"
IDS_UPDATES_USELOCAL "Build updates locally before installing"
IDS_UPDATES_UPDATESERVERS "Update servers:"
IDS_UPDATES_RELEASES "Releases"
IDS_UPDATES_RELEASES_PROMPT "Type a URL that serves resources adhering to GitHub's releases API. To learn how to configure your own update server, please consult the wiki."
IDS_UPDATES_STAGING "Pre-releases"
IDS_UPDATES_STAGING_PROMPT "Type a URL that serves resources adhering to GitHub's pre-releases API. To learn how to configure your own update server, please consult the wiki."
IDS_UPDATES_CHECK "Check for updates"
IDS_UPDATES_INSTALL "Update program and restart File Explorer"
IDS_UPDATES_CHANGES "Read about changes in the latest releases"
IDS_UPDATES_LEARN "Learn more"
IDS_ADV "Advanced"
IDS_ADV_DISCLAIMER "Only change these settings after reading the documentation about them."
IDS_ADV_LEARN "Learn more"
IDS_ADV_CONSOLE "Enable console"
IDS_ADV_MEMCHECK "Dump memory leaks"
IDS_ADV_AUTOHIDE "Double click taskbar to toggle auto-hide (only works when locked)"
IDS_ADV_PAINTDESKTOPVERSION "Show Windows build info on the desktop"
IDS_ADV_CLASSICTHEME "Enable advanced mitigations for correct rendering using classic theme"
IDS_ADV_SYSLISTVIEW32 "Enable SysListView32 for Explorer views"
IDS_ADV_NOPROPERTIES "Do not change the taskbar context menu (e.g. do not display the ""Properties"" item)"
IDS_ADV_SYMBOLS "Enable symbols download"
IDS_ADV_PINNEDITEMS "Pinned items act as quick launch (don't group with active apps)"
IDS_ADV_REMOVEEXTRAGAP "When the taskbar shows button labels, remove the extra gap around pinned items"
IDS_ADV_XAMLSOUNDS "Enable UI sounds in Explorer's XAML views"
IDS_ABOUT "About"
IDS_ABOUT_VERSION "Version %d.%d.%d.%d%s"
IDS_ABOUT_PROJECT "This project aims to enhance the working environment on Windows."
IDS_ABOUT_AUTHOR "Proudly engineered by Valentin-Gabriel Radu."
IDS_ABOUT_OS "Running on %s, OS Build %d.%d."
IDS_ABOUT_GITHUB "Visit project GitHub"
IDS_ABOUT_WEBSITE "Visit web site"
IDS_ABOUT_DONATE "Donate"
IDS_ABOUT_FAQ "Frequently Asked Questions"
IDS_ABOUT_SETTINGS "Learn more about managing your settings"
IDS_ABOUT_IMPORT "Import settings"
IDS_ABOUT_EXPORT "Export current settings"
IDS_ABOUT_EXPORT_SUCCESS "Settings have been exported successfully."
IDS_ABOUT_RESET "Restore default settings"
IDS_MAINTENANCE "Settings and uninstall"
IDS_UNINSTALL "Uninstall"
IDS_UNINSTALL_UNINSTALL "Uninstall ExplorerPatcher"
IDS_FOOTER_RESTART "Restart File Explorer"
END

24
ep_gui/resources/resource.h

@ -0,0 +1,24 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by ep_gui.rc
//
#define IDR_REGISTRY1 101
#define IDR_REGISTRY2 102
#define IDS_PRODUCTNAME 201
// 301-500
#include "EPSharedResources.h"
// 1001-2200
#include "EPSettingsResources.h"
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

801
ep_gui/resources/settings.reg

@ -0,0 +1,801 @@
Windows Registry Editor Version 5.00
;M Settings
;q
;T %R:1001%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 3 %R:1002% *
;x 0 %R:1003%
;x 1 %R:1004%
;x 2 %R:1047%
"OldTaskbar"=dword:00000002
;y %R:1005% 🡕
;ms-settings:taskbar
;y %R:1006% 🡕
;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}
;y %R:1007% 🡕
;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}\SystemIcons
;s Taskbar_LocationSection !(IsWindows11Version22H2OrHigher&&!IsOldTaskbar)
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 4 %R:1008% *
;x 3 %R:1009%
;x 1 %R:1010%
;x 0 %R:1011%
;x 2 %R:1012%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_TaskbarPosition"=dword:00000003
;c 4 %R:1013%
;x 3 %R:1009%
;x 1 %R:1010%
;x 0 %R:1011%
;x 2 %R:1012%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_MMTaskbarPosition"=dword:00000003
;g Taskbar_LocationSection
;s Taskbar_CortanaButtonSection !IsWindows11Version22H2OrHigher
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 3 %R:1014%
;x 0 %R:1015%
;x 2 %R:1016%
;x 1 %R:1017%
"TaskbarDa"=dword:00000000
;g Taskbar_CortanaButtonSection
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search]
;c 3 %R:1019%
;x 0 %R:1020%
;x 1 %R:1021%
;x 2 %R:1022%
"SearchboxTaskbarMode"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b %R:1024%
"ShowTaskViewButton"=dword:00000001
;s Taskbar_CortanaButtonSection1 IsWindows11Version22H2OrHigher
;s Taskbar_CortanaButtonSection2 !IsOldTaskbar
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b %R:1025%
"TaskbarDa"=dword:00000001
;g Taskbar_CortanaButtonSection2
;g Taskbar_CortanaButtonSection1
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1026%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_AutoHideTaskbar"=dword:00000000
;s Taskbar_Windows10Section IsOldTaskbar
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 2 %R:1027% *
;x 0 %R:1028%
;x 1 %R:1029%
"OrbStyle"=dword:00000000
;c 5 %R:1030%
;x 0 %R:1031%
;x 1 %R:1032%
;x 5 %R:1033%
;x 3 %R:1034%
;x 7 %R:1035%
"OldTaskbarAl"=dword:00000000
;c 5 %R:1036%
;x 0 %R:1031%
;x 1 %R:1032%
;x 5 %R:1033%
;x 3 %R:1034%
;x 7 %R:1035%
"MMOldTaskbarAl"=dword:00000000
;g Taskbar_Windows10Section
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 3 %R:1037%
;x 0 %R:1038%
;x 1 %R:1040%
;x 2 %R:1042%
"TaskbarGlomLevel"=dword:00000000
;c 3 %R:1043%
;x 0 %R:1038%
;x 1 %R:1040%
;x 2 %R:1042%
"MMTaskbarGlomLevel"=dword:00000000
;s Taskbar_Windows10Section IsOldTaskbar
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 2 %R:1044%
;x 1 %R:1045%
;x 0 %R:1046%
"TaskbarSmallIcons"=dword:00000000
;g Taskbar_Windows10Section
;s Taskbar_AltImplSection IsAltImplTaskbar
;y %R:1048%
;https://github.com/valinet/ExplorerPatcher/wiki/ExplorerPatcher's-taskbar-implementation
;g Taskbar_AltImplSection
;T %R:1101%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1102%
"SkinMenus"=dword:00000001
;b %R:1103%
"CenterMenus"=dword:00000001
;b %R:1104%
"FlyoutMenus"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7]
;b %R:1105% *
"TipbandDesiredVisibility"=dword:00000000
;s SystemTray_Section98 IsOldTaskbar
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b %R:1106%
"ShowSecondsInSystemClock"=dword:00000000
;g SystemTray_Section98
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;i %R:1107% *
"HideControlCenterButton"=dword:00000000
;s SystemTray_Section109 IsOldTaskbar
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 3 %R:1108%
;x 1 %R:1109%
;x 0 %R:1110%
;x 2 %R:1111%
"TaskbarSD"=dword:00000001
;g SystemTray_Section109
;s SystemTray_Section117 !IsOldTaskbar
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b %R:1108%
"TaskbarSD"=dword:00000001
;g SystemTray_Section117
;s SystemTray_Windows10Section IsOldTaskbar
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;p 2
;b %R:1112% *
"SkinIcons"=dword:00000001
;s Taskbar_AltImplSection IsAltImplTaskbar
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 2 %R:1143% *
;x 0 %R:1144%
;x 1 %R:1145%
"TrayOverflowStyle"=dword:00000000
;g Taskbar_AltImplSection
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;a %R:1113%
;c 3 %R:1114%
;x 0 %R:1115%
;x 1 %R:1116%
;x 2 %R:1117%
"ReplaceNetwork"=dword:00000000
;q
;t %R:1118%
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Control Panel\Settings\Network]
;c 7 %R:1119%
;x 6 %R:1120%
;x 5 %R:1121%
;x 0 %R:1122%
;x 2 %R:1123%
;x 1 %R:1124%
;x 3 %R:1116%
;x 4 %R:1117%
"ReplaceVan"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC]
;c 2 %R:1125%
;x 1 %R:1126%
;x 0 %R:1127%
"EnableMtcUvc"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell]
;c 3 %R:1128%
;x 2 %R:1129%
;x 0 %R:1130%
;x 1 %R:1131%
"UseWin32TrayClockExperience"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell]
;c 2 %R:1133%
;x 0 %R:1134%
;x 1 %R:1135%
"UseWin32BatteryFlyout"=dword:00000000
;s SystemTray_LanguageSwitcherBefore22H2 !IsWindows11Version22H2OrHigher
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 3 %R:1136% *
;x 0 %R:1137%
;x 1 %R:1138%
;x 4 %R:1140%
"IMEStyle"=dword:00000000
;g SystemTray_LanguageSwitcherBefore22H2
;s SystemTray_LanguageSwitcherAfter22H2 IsWindows11Version22H2OrHigher
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 4 %R:1136% *
;x 0 %R:1137%
;x 7 %R:1140%
;x 1 %R:1141%
;x 4 %R:1142%
"IMEStyle"=dword:00000000
;g SystemTray_LanguageSwitcherAfter22H2
;g SystemTray_Windows10Section
;T %R:1201%
;e %R:1202%
;e %R:1203%
;y %R:1204% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Using-ExplorerPatcher-as-shell-extension
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;q
;b %R:1205%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_RegisterAsShellExtension"=dword:00000000
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32]
;d %R:1206% *
@=""
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1207%
"LegacyFileTransferDialog"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1208%
"UseClassicDriveGrouping"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 4 %R:1209% *
;x 0 %R:1210%
;x 4 %R:1212%
;x 1 %R:1214%
;x 2 %R:1215%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_FileExplorerCommandUI"=dword:00000000
;t %R:1216%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;i %R:1217% **
"DisableImmersiveContextMenu"=dword:00000000
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32]
;d %R:1218% **
@=""
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1219%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableModernSearchBar"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1220% **
"ShrinkExplorerAddressBar"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1221% **
"HideExplorerSearchBar"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 4 %R:1222%
;x 0 %R:1223%
;x 1 %R:1224%
;x 2 %R:1225%
;x 3 %R:1226%
"HideIconAndTitleInExplorer"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1227% **
"MicaEffectOnTitlebar"=dword:00000000
;T %R:1301%
;s StartMenu_StyleSection DoesWindows10StartMenuExist
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;z 2 %R:1302% *
;x 0 %R:1303%
;x 1 %R:1304%
"Start_ShowClassicMode"=dword:00000000
;g StartMenu_StyleSection
;y %R:1305% 🡕
;ms-settings:personalization-start
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 2 %R:1306%
;x 0 %R:1307%
;x 1 %R:1308%
"TaskbarAl"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 22 %R:1309%
;x 0 %R:1310%
;x 1 1
;x 2 2
;x 3 3
;x 4 4
;x 5 5
;x 6 %R:1311%
;x 7 7
;x 8 8
;x 9 9
;x 10 10
;x 11 11
;x 12 12
;x 13 13
;x 14 14
;x 15 15
;x 16 16
;x 17 17
;x 18 18
;x 19 19
;x 20 20
;x 99999 %R:1312%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_Start_MaximumFrequentApps"=dword:00000006
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage]
;a %R:1313%
;c 10 %R:1314%
;x 1 %R:1315%
;x 0 %R:1316%
;x 2 %R:1317%
;x 3 %R:1318%
;x 4 %R:1319%
;x 5 %R:1320%
;x 6 %R:1321%
;x 7 %R:1322%
;x 8 %R:1323%
;x 9 %R:1324%
"MonitorOverride"=dword:00000001
;s StartMenu_Windows11 !IsWindows10StartMenu
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1325%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartDocked_DisableRecommendedSection"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage]
;b %R:1326%
"MakeAllAppsDefault"=dword:00000000
;g StartMenu_Windows11
;s StartMenu_Windows10 IsWindows10StartMenu
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1327%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartUI_ShowMoreTiles"=dword:00000000
;c 3 %R:1328%
;x 1 %R:1329%
;x 2 %R:1330%
;x 0 %R:1331%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartUI_EnableRoundedCorners"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 3 %R:1332%
;x 0 %R:1333%
;x 1 %R:1334%
;x 2 %R:1335%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_ForceStartSize"=dword:00000000
;c 3 %R:1336%
;x 0 %R:1337%
;x 3 %R:1338%
;x 1 %R:1339%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_NoStartMenuMorePrograms"=dword:00000000
;y %R:1340%
;https://github.com/valinet/ExplorerPatcher/discussions/1679
;g StartMenu_Windows10
;T %R:1401%
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
;z 4 %R:1402% *
;x 0 %R:1403%
;x 3 %R:1405%
;x 1 %R:1406%
;x 2 %R:1407%
"AltTabSettings"=dword:00000000
;s WindowSwitcher_SWS IsSWSEnabled
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;b %R:1408%
"IncludeWallpaper"=dword:00000001
;b %R:1409%
"PrimaryOnly"=dword:00000000
;b %R:1410%
"PerMonitor"=dword:00000000
;b %R:1411%
"SwitcherIsPerApplication"=dword:00000000
;b %PLACEHOLDER_0001%
"NoPerApplicationList"=dword:00000000
;c 3 %R:1413%
;x 0 %R:1414%
;x 1 %R:1415%
;x 2 %R:1416%
"Theme"=dword:00000000
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MultitaskingView\AltTabViewHost]
;c 19 %R:1417%
;x 100 %R:1418%
;x 98 98 %
;x 96 96 %
;x 95 %R:1419%
;x 94 94 %
;x 92 92 %
;x 90 90 %
;x 85 85 %
;x 80 80 %
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
;x 50 50 %
;x 45 45 %
;x 40 40 %
;x 35 35 %
;x 30 30 %
"Grid_backgroundPercent"=dword:0000005F
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;c 3 %R:1420%
;x 0 %R:1421%
;x 1 %R:1422%
;x 2 %R:1423%
"ColorScheme"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;c 3 %R:1424%
;x 2 %R:1425%
;x 3 %R:1426%
;x 1 %R:1427%
"CornerPreference"=dword:00000002
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;c 20 %R:1428%
;x 330 330 pt
;x 320 320 pt
;x 310 310 pt
;x 300 300 pt
;x 290 290 pt
;x 280 280 pt
;x 270 270 pt
;x 260 260 pt
;x 250 250 pt
;x 240 240 pt
;x 230 %R:1429%
;x 220 220 pt
;x 210 210 pt
;x 200 200 pt
;x 190 190 pt
;x 180 180 pt
;x 170 170 pt
;x 160 160 pt
;x 150 150 pt
;x 140 140 pt
"RowHeight"=dword:000000e6
;c 10 %R:1430%
;x 100 %R:1431%
;x 95 95 %
;x 90 90 %
;x 85 85 %
;x 80 %R:1432%
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
"MaxWidth"=dword:00000050
;c 10 %R:1433%
;x 100 %R:1434%
;x 95 95 %
;x 90 90 %
;x 85 85 %
;x 80 %R:1435%
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
"MaxHeight"=dword:00000050
;c 11 %R:1436%
;x 50 50 pt
;x 45 45 pt
;x 40 40 pt
;x 35 30 pt
;x 30 30 pt
;x 25 25 pt
;x 20 %R:1437%
;x 15 15 pt
;x 10 10 pt
;x 5 5 pt
;x 0 %R:1438%
"MasterPadding"=dword:00000014
;c 11 %R:1439%
;x 0 %R:1440%
;x 25 %R:1441%
;x 50 %R:1442%
;x 75 %R:1443%
;x 100 %R:1444%
;x 125 %R:1445%
;x 150 %R:1446%
;x 200 %R:1447%
;x 300 %R:1448%
;x 400 %R:1449%
;x 500 %R:1450%
"ShowDelay"=dword:00000064
;c 3 %R:1451%
;x 0 %R:1452%
;x 1 %R:1453%
;x 2 %R:1454%
"ScrollWheelBehavior"=dword:00000000
;q
;y %R:1455% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Simple-Window-Switcher
;g WindowSwitcher_SWS
;s Weather_Windows10 IsOldTaskbar
;T %R:1501%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1502%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_PeopleBand"=dword:00000000
;s Weather_Section1 IsWeatherEnabled
;w %R:1503%
;%R:1504%
;%R:1505%
"WeatherLocation"=""
;c 5 %R:1506%
;x 0 %R:1507%
;x 3 %R:1508%
;x 1 %R:1509%
;x 4 %R:1510%
;x 5 %R:1511%
"WeatherViewMode"=dword:00000000
;c 3 %R:1512%
;x 0 %R:1513%
;x 2 %R:1514%
;x 1 %R:1515%
"WeatherFixedSize"=dword:00000000
;c 2 %R:1516%
;x 0 %R:1517%
;x 1 %R:1518%
"WeatherToLeft"=dword:00000000
;c 7 %R:1519%
;x 60 %R:1520%
;x 300 %R:1521%
;x 900 %R:1522%
;x 1200 %R:1523%
;x 1800 %R:1524%
;x 3600 %R:1525%
;x 7200 %R:1526%
"WeatherContentUpdateMode"=dword:000004B0
;c 2 %R:1527%
;x 0 %R:1528%
;x 1 %R:1529%
"WeatherTemperatureUnit"=dword:00000000
;;;c 2 Location accuracy
;;;x 0 Generic (based on the IP address) (default)
;;;x 1 Precise (geolocation)
;;"WeatherLocationType"=dword:00000000
;w %R:1533%
;%R:1534%
;%R:1535%
"WeatherLanguage"=""
;c 3 %R:1536%
;x 0 %R:1537%
;x 1 %R:1538%
;x 2 %R:1539%
"WeatherTheme"=dword:00000000
;c 3 %R:1540%
;x 2 %R:1541%
;x 3 %R:1542%
;x 1 %R:1543%
"WeatherWindowCornerPreference"=dword:00000002
;c 2 %R:1544%
;x 0 %R:1545%
;x 1 %R:1546%
"WeatherIconPack"=dword:00000000
;c 2 %R:1547%
;x 0 %R:1548%
;x 1 %R:1549%
"WeatherContentsMode"=dword:00000000
;c 17 %R:1550%
;x 25 25 %
;x 33 33 %
;x 50 50 %
;x 67 67 %
;x 75 75 %
;x 80 80 %
;x 90 90 %
;x 0 %R:1551%
;x 110 110 %
;x 125 125 %
;x 150 150 %
;x 175 175 %
;x 200 200 %
;x 250 250 %
;x 300 300 %
;x 400 400 %
;x 500 500 %
"WeatherZoomFactor"=dword:00000000
;q
;g Weather_Section1
;y %R:1552% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Weather
;s Weather_Section2 IsWeatherEnabled
;t %WEATHERLASTUPDATETEXT%
;u %R:1554%
;update_weather
;u %R:1555%
;clear_data_weather
;g Weather_Section2
;g Weather_Windows10
;s Spotlight_SpotlightOSCheck DoesOSBuildSupportSpotlight
;s Spotlight_SpotlightEnabledCheck IsSpotlightEnabled
;T %R:1601%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1602%
"SpotlightDisableIcon"=dword:00000000
;c 8 %R:1603%
;x 0 %R:1604%
;x 32 %R:1605%
;x 48 %R:1606%
;x 288 %R:1607%
;x 800 %R:1608%
;x 304 %R:1609%
;x 816 %R:1610%
;x 1008 %R:1611%
"SpotlightDesktopMenuMask"=dword:00000000
;c 11 %R:1612%
;x 0 %R:1613%
;x 60 %R:1614%
;x 300 %R:1615%
;x 900 %R:1616%
;x 1200 %R:1617%
;x 1800 %R:1618%
;x 3600 %R:1619%
;x 7200 %R:1620%
;x 21600 %R:1621%
;x 43200 %R:1622%
;x 86400 %R:1623%
"SpotlightUpdateSchedule"=dword:00000000
;u %SPOTLIGHTCLICK%
;spotlight_click
;t %SPOTLIGHTINFOTIP1%
;t %SPOTLIGHTINFOTIP2%
;u %SPOTLIGHTNEXT%
;spotlight_next
;u %SPOTLIGHTLIKE%
;spotlight_like
;u %SPOTLIGHTDISLIKE%
;spotlight_dislike
;;;u %R:1624%
;;;spotlight_menu
;g Spotlight_SpotlightEnabledCheck
;g Spotlight_SpotlightOSCheck
;T %R:1701%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1702%
"LastSectionInProperties"=dword:00000000
;b %R:1703% *
"ClockFlyoutOnWinC"=dword:00000000
;b %R:1704% *
"ToolbarSeparators"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1705%
"PropertiesInWinX"=dword:00000000
;b %R:1707%
"NoMenuAccelerator"=dword:00000000
;b %R:1708% *
"DisableOfficeHotkeys"=dword:00000000
;b %R:1709% *
"DisableWinFHotkey"=dword:00000000
;b %R:1710%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableRoundedCorners"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1711% *
"DisableAeroSnapQuadrants"=dword:00000000
;s Other_SnapAssistStyle !IsWindows11Version22H2OrHigher
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 2 %R:1712%
;x 0 %R:1713%
;x 3 %R:1714%
"SnapAssistSettings"=dword:00000000
;g Other_SnapAssistStyle
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 6 %R:1715%
;x 256 %R:1716%
;x 1 %R:1717%
;x 16 %R:1718%
;x 64 %R:1719%
;x 2 %R:1720%
;x 4 %R:1721%
"Start_PowerButtonAction"=dword:00000002
;s LogonLogoffShutdownSounds LogonLogoffShutdownSoundsAvailable
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1727% *
"LogonLogoffShutdownSounds"=dword:00000000
;g LogonLogoffShutdownSounds
;t %R:1722%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1723%
"DoNotRedirectSystemToSettingsApp"=dword:00000000
;b %R:1724%
"DoNotRedirectProgramsAndFeaturesToSettingsApp"=dword:00000000
;b %R:1725%
"DoNotRedirectDateAndTimeToSettingsApp"=dword:00000000
;b %R:1726%
"DoNotRedirectNotificationIconsToSettingsApp"=dword:00000000
;T %R:1801%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 3 %R:1802%
;x 1 %R:1803%
;x 0 %R:1804%
;x 2 %R:1805%
"UpdatePolicy"=dword:00000001
;b %R:1806%
"UpdatePreferStaging"=dword:00000000
;b %R:1807%
"UpdateAllowDowngrades"=dword:00000000
;b %R:1817%
"UpdateUseLocal"=dword:00000000
;t %R:1808%
;w %R:1809%
;%R:1810%
;github.com/valinet/ExplorerPatcher/releases/latest
"UpdateURL"=""
;w %R:1811%
;%R:1812%
;api.github.com/repos/valinet/ExplorerPatcher/releases?per_page=1
"UpdateURLStaging"=""
;y %R:1813%
;;;EP_CHECK_FOR_UPDATES
;y %R:1814%
;;;EP_INSTALL_UPDATES
;y %R:1815% 🡕
;https://github.com/valinet/ExplorerPatcher/blob/master/CHANGELOG.md
;y %R:1816% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Configure-updates
;T %R:1901%
;e %R:1902%
;y %R:1903% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/About-advanced-settings
;q
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1904%
"AllocConsole"=dword:00000000
;b %R:1905%
"Memcheck"=dword:00000000
;b %R:1906%
"TaskbarAutohideOnDoubleClick"=dword:00000000
[HKEY_CURRENT_USER\Control Panel\Desktop]
;b %R:1907% *
"PaintDesktopVersion"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1908% *
"ClassicThemeMitigations"=dword:00000000
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{1eeb5b5a-06fb-4732-96b3-975c0194eb39}\InprocServer32]
;d %R:1909% *
@=""
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1910%
"NoPropertiesInContextMenu"=dword:00000000
;b %R:1911% *
"EnableSymbolDownload"=dword:00000001
;s Advanced_Windows10 IsOldTaskbar
;b %R:1912% *
"PinnedItemsActAsQuickLaunch"=dword:00000000
;b %R:1913% *
"RemoveExtraGapAroundPinnedItems"=dword:00000000
;g Advanced_Windows10
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ExplorerPatcher]
;b %R:1927% *
"XamlSounds"=dword:00000000
;T %R:2301%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 10001 %R:1533%
"Language"=dword:00000000
;y %R:2011% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Settings-management
;u %R:2012%
;import
;u %R:2013%
;export
;u %R:2015%
;reset
;u %R:2102%
;uninstall
;T %R:2001%
;e %R:201%
;e %VERSIONINFORMATIONSTRING%
;t © 2006-2025 VALINET Solutions SRL. All rights reserved.
;e
;e %R:2003%
;e %R:2004%
;t %OSVERSIONSTRING%
;y %R:2006% (https://github.com/valinet) 🡕
;https://github.com/valinet
;q
;y %R:2007% (https://www.valinet.ro) 🡕
;https://www.valinet.ro
;y %R:2009% 🡕
;https://github.com/valinet/ExplorerPatcher#donate
;y %R:2010% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Frequently-asked-questions
;f
;u %R:2201% (*)
;restart

629
ep_gui/resources/settings10.reg

@ -0,0 +1,629 @@
Windows Registry Editor Version 5.00
;M Settings
;q
;T %R:1001%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 2 %R:1002% *
;x 1 %R:1404%
;x 2 %R:1047%
"OldTaskbar"=dword:00000001
;y %R:1005% 🡕
;ms-settings:taskbar
;y %R:1006% 🡕
;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}
;y %R:1007% 🡕
;shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9}\SystemIcons
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 4 %R:1008% *
;x 3 %R:1009%
;x 1 %R:1010%
;x 0 %R:1011%
;x 2 %R:1012%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_TaskbarPosition"=dword:00000003
;c 4 %R:1013%
;x 3 %R:1009%
;x 1 %R:1010%
;x 0 %R:1011%
;x 2 %R:1012%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_MMTaskbarPosition"=dword:00000003
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search]
;c 3 %R:1019%
;x 0 %R:1020%
;x 1 %R:1021%
;x 2 %R:1022%
"SearchboxTaskbarMode"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b %R:1023%
"ShowCortanaButton"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b %R:1024%
"ShowTaskViewButton"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1026%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_AutoHideTaskbar"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 2 %R:1027% *
;x 0 %R:1028%
;x 1 %R:1029%
"OrbStyle"=dword:00000000
;c 5 %R:1030%
;x 0 %R:1031%
;x 1 %R:1032%
;x 5 %R:1033%
;x 3 %R:1034%
;x 7 %R:1035%
"OldTaskbarAl"=dword:00000000
;c 5 %R:1036%
;x 0 %R:1031%
;x 1 %R:1032%
;x 5 %R:1033%
;x 3 %R:1034%
;x 7 %R:1035%
"MMOldTaskbarAl"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 3 %R:1037%
;x 0 %R:1038%
;x 1 %R:1040%
;x 2 %R:1042%
"TaskbarGlomLevel"=dword:00000000
;c 3 %R:1043%
;x 0 %R:1038%
;x 1 %R:1040%
;x 2 %R:1042%
"MMTaskbarGlomLevel"=dword:00000000
;c 2 %R:1044%
;x 1 %R:1045%
;x 0 %R:1046%
"TaskbarSmallIcons"=dword:00000000
;s Taskbar_AltImplSection IsAltImplTaskbar
;y %R:1048%
;https://github.com/valinet/ExplorerPatcher/wiki/ExplorerPatcher's-taskbar-implementation
;g Taskbar_AltImplSection
;T %R:1101%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1102%
"SkinMenus"=dword:00000001
;b %R:1103%
"CenterMenus"=dword:00000001
;b %R:1104%
"FlyoutMenus"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7]
;b %R:1105% *
"TipbandDesiredVisibility"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b %R:1106%
"ShowSecondsInSystemClock"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 3 %R:1108%
;x 1 %R:1109%
;x 0 %R:1110%
;x 2 %R:1111%
"TaskbarSD"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;p 2
;b %R:1112% *
"SkinIcons"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;a %R:1113%
;c 3 %R:1114%
;x 0 %R:1115%
;x 1 %R:1116%
;x 2 %R:1117%
"ReplaceNetwork"=dword:00000000
;q
;t %R:1118%
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Control Panel\Settings\Network]
;c 5 %R:1119%
;x 0 %R:1122%
;x 2 %R:1123%
;x 1 %R:1124%
;x 3 %R:1116%
;x 4 %R:1117%
"ReplaceVan"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC]
;c 2 %R:1125%
;x 1 %R:1126%
;x 0 %R:1127%
"EnableMtcUvc"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell]
;c 3 %R:1128%
;x 0 %R:1130%
;x 1 %R:1131%
;x 2 %R:1132%
"UseWin32TrayClockExperience"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell]
;c 2 %R:1133%
;x 0 %R:1134%
;x 1 %R:1135%
"UseWin32BatteryFlyout"=dword:00000000
;T %R:1201%
;e %R:1202%
;e %R:1203%
;y %R:1204% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Using-ExplorerPatcher-as-shell-extension
;q
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1205%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_RegisterAsShellExtension"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1207%
"LegacyFileTransferDialog"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1208%
"UseClassicDriveGrouping"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;c 2 %R:1209%
;x 0 %R:1213%
;x 2 %R:1215%
"FileExplorerCommandUI"=dword:00000000
;t %R:1216%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;i %R:1217% **
"DisableImmersiveContextMenu"=dword:00000000
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{056440FD-8568-48e7-A632-72157243B55B}\InprocServer32]
;d %R:1218% **
@=""
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1219%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_DisableModernSearchBar"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1220% **
"ShrinkExplorerAddressBar"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1221% **
"HideExplorerSearchBar"=dword:00000000
;p 2
;b Mica effect on title bar
"MicaEffectOnTitlebar"=dword:00000000
;T %R:1301%
;y %R:1305% 🡕
;ms-settings:personalization-start
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;z 2 %R:1306%
;x 0 %R:1307%
;x 1 %R:1308%
"TaskbarAl"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 22 %R:1309%
;x 0 %R:1310%
;x 1 1
;x 2 2
;x 3 3
;x 4 4
;x 5 5
;x 6 %R:1311%
;x 7 7
;x 8 8
;x 9 9
;x 10 10
;x 11 11
;x 12 12
;x 13 13
;x 14 14
;x 15 15
;x 16 16
;x 17 17
;x 18 18
;x 19 19
;x 20 20
;x 99999 %R:1312%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_Start_MaximumFrequentApps"=dword:00000006
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StartPage]
;e %R:1313%
;z 10 %R:1314%
;x 1 %R:1315%
;x 0 %R:1316%
;x 2 %R:1317%
;x 3 %R:1318%
;x 4 %R:1319%
;x 5 %R:1320%
;x 6 %R:1321%
;x 7 %R:1322%
;x 8 %R:1323%
;x 9 %R:1324%
"MonitorOverride"=dword:00000001
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 3 %R:1328%
;x 1 %R:1329%
;x 2 %R:1330%
;x 0 %R:1331%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_StartUI_EnableRoundedCorners"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 3 %R:1332%
;x 0 %R:1333%
;x 1 %R:1334%
;x 2 %R:1335%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_ForceStartSize"=dword:00000000
;z 3 %R:1336%
;x 0 %R:1337%
;x 3 %R:1338%
;x 1 %R:1339%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_NoStartMenuMorePrograms"=dword:00000000
;t %R:1341%
;T %R:1401%
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
;z 3 %R:1402% *
;x 0 %R:1404%
;x 1 %R:1406%
;x 2 %R:1407%
"AltTabSettings"=dword:00000000
;s WindowSwitcher_SWS IsSWSEnabled
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;b %R:1408%
"IncludeWallpaper"=dword:00000001
;b %R:1409%
"PrimaryOnly"=dword:00000000
;b %R:1410%
"PerMonitor"=dword:00000000
;b %R:1411%
"SwitcherIsPerApplication"=dword:00000000
;b %PLACEHOLDER_0001%
"NoPerApplicationList"=dword:00000000
;c 2 %R:1413%
;x 0 %R:1414%
;x 1 %R:1415%
"Theme"=dword:00000000
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MultitaskingView\AltTabViewHost]
;c 19 %R:1417%
;x 100 %R:1418%
;x 98 98 %
;x 96 96 %
;x 95 %R:1419%
;x 94 94 %
;x 92 92 %
;x 90 90 %
;x 85 85 %
;x 80 80 %
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
;x 50 50 %
;x 45 45 %
;x 40 40 %
;x 35 35 %
;x 30 30 %
"Grid_backgroundPercent"=dword:0000005F
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;c 3 %R:1420%
;x 0 %R:1421%
;x 1 %R:1422%
;x 2 %R:1423%
"ColorScheme"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher\sws]
;c 20 %R:1424%
;x 330 330 pt
;x 320 320 pt
;x 310 310 pt
;x 300 300 pt
;x 290 290 pt
;x 280 280 pt
;x 270 270 pt
;x 260 260 pt
;x 250 250 pt
;x 240 240 pt
;x 230 %R:1429%
;x 220 220 pt
;x 210 210 pt
;x 200 200 pt
;x 190 190 pt
;x 180 180 pt
;x 170 170 pt
;x 160 160 pt
;x 150 150 pt
;x 140 140 pt
"RowHeight"=dword:000000e6
;c 10 %R:1430%
;x 100 %R:1431%
;x 95 95 %
;x 90 90 %
;x 85 85 %
;x 80 %R:1432%
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
"MaxWidth"=dword:00000050
;c 10 %R:1433%
;x 100 %R:1434%
;x 95 95 %
;x 90 90 %
;x 85 85 %
;x 80 %R:1435%
;x 75 75 %
;x 70 70 %
;x 65 65 %
;x 60 60 %
;x 55 55 %
"MaxHeight"=dword:00000050
;c 11 %R:1436%
;x 50 50 pt
;x 45 45 pt
;x 40 40 pt
;x 35 30 pt
;x 30 30 pt
;x 25 25 pt
;x 20 %R:1437%
;x 15 15 pt
;x 10 10 pt
;x 5 5 pt
;x 0 %R:1438%
"MasterPadding"=dword:00000014
;c 11 %R:1439%
;x 0 %R:1440%
;x 25 %R:1441%
;x 50 %R:1442%
;x 75 %R:1443%
;x 100 %R:1444%
;x 125 %R:1445%
;x 150 %R:1446%
;x 200 %R:1447%
;x 300 %R:1448%
;x 400 %R:1449%
;x 500 %R:1450%
"ShowDelay"=dword:00000064
;c 3 %R:1451%
;x 0 %R:1452%
;x 1 %R:1453%
;x 2 %R:1454%
"ScrollWheelBehavior"=dword:00000000
;q
;y %R:1455% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Simple-Window-Switcher
;g WindowSwitcher_SWS
;T %R:1501%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1502%
;"Virtualized_{D17F1E1A-5919-4427-8F89-A1A8503CA3EB}_PeopleBand"=dword:00000000
;s Weather_Section1 IsWeatherEnabled
;w %R:1503%
;%R:1504%
;%R:1505%
"WeatherLocation"=""
;c 5 %R:1506%
;x 0 %R:1507%
;x 3 %R:1508%
;x 1 %R:1509%
;x 4 %R:1510%
;x 5 %R:1511%
"WeatherViewMode"=dword:00000000
;c 3 %R:1512%
;x 0 %R:1513%
;x 2 %R:1514%
;x 1 %R:1515%
"WeatherFixedSize"=dword:00000000
;c 2 %R:1516%
;x 0 %R:1517%
;x 1 %R:1518%
"WeatherToLeft"=dword:00000000
;c 7 %R:1519%
;x 60 %R:1520%
;x 300 %R:1521%
;x 900 %R:1522%
;x 1200 %R:1523%
;x 1800 %R:1524%
;x 3600 %R:1525%
;x 7200 %R:1526%
"WeatherContentUpdateMode"=dword:000004B0
;c 2 %R:1527%
;x 0 %R:1528%
;x 1 %R:1529%
"WeatherTemperatureUnit"=dword:00000000
;;;c 2 Location accuracy
;;;x 0 Generic (based on the IP address) (default)
;;;x 1 Precise (geolocation)
;;"WeatherLocationType"=dword:00000000
;w %R:1533%
;%R:1534%
;%R:1535%
"WeatherLanguage"=""
;c 3 %R:1536%
;x 0 %R:1537%
;x 1 %R:1538%
;x 2 %R:1539%
"WeatherTheme"=dword:00000000
;c 2 %R:1544%
;x 0 %R:1545%
;x 1 %R:1546%
"WeatherIconPack"=dword:00000000
;c 2 %R:1547%
;x 0 %R:1548%
;x 1 %R:1549%
"WeatherContentsMode"=dword:00000000
;c 17 %R:1550%
;x 25 25 %
;x 33 33 %
;x 50 50 %
;x 67 67 %
;x 75 75 %
;x 80 80 %
;x 90 90 %
;x 0 %R:1551%
;x 110 110 %
;x 125 125 %
;x 150 150 %
;x 175 175 %
;x 200 200 %
;x 250 250 %
;x 300 300 %
;x 400 400 %
;x 500 500 %
"WeatherZoomFactor"=dword:00000000
;q
;g Weather_Section1
;y %R:1552% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Weather
;s Weather_Section2 IsWeatherEnabled
;t %WEATHERLASTUPDATETEXT%
;u %R:1554%
;update_weather
;u %R:1555%
;clear_data_weather
;g Weather_Section2
;T %R:1701%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1702%
"LastSectionInProperties"=dword:00000000
;b %R:1703% *
"ClockFlyoutOnWinC"=dword:00000000
;b %R:1704% *
"ToolbarSeparators"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;b %R:1706% *
"DontUsePowerShellOnWinX"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1707%
"NoMenuAccelerator"=dword:00000000
;b %R:1708% *
"DisableOfficeHotkeys"=dword:00000000
;b %R:1709% *
"DisableWinFHotkey"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;c 6 %R:1715%
;x 256 %R:1716%
;x 1 %R:1717%
;x 16 %R:1718%
;x 64 %R:1719%
;x 2 %R:1720%
;x 4 %R:1721%
"Start_PowerButtonAction"=dword:00000002
;s LogonLogoffShutdownSounds LogonLogoffShutdownSoundsAvailable
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1727% *
"LogonLogoffShutdownSounds"=dword:00000000
;g LogonLogoffShutdownSounds
;t %R:1722%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1723%
"DoNotRedirectSystemToSettingsApp"=dword:00000000
;b %R:1724%
"DoNotRedirectProgramsAndFeaturesToSettingsApp"=dword:00000000
;b %R:1725%
"DoNotRedirectDateAndTimeToSettingsApp"=dword:00000000
;b %R:1726%
"DoNotRedirectNotificationIconsToSettingsApp"=dword:00000000
;T %R:1801%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 3 %R:1802%
;x 1 %R:1803%
;x 0 %R:1804%
;x 2 %R:1805%
"UpdatePolicy"=dword:00000001
;b %R:1806%
"UpdatePreferStaging"=dword:00000000
;b %R:1807%
"UpdateAllowDowngrades"=dword:00000000
;b %R:1817%
"UpdateUseLocal"=dword:00000000
;t %R:1808%
;w %R:1809%
;%R:1810%
;github.com/valinet/ExplorerPatcher/releases/latest
"UpdateURL"=""
;w %R:1811%
;%R:1812%
;api.github.com/repos/valinet/ExplorerPatcher/releases?per_page=1
"UpdateURLStaging"=""
;y %R:1813%
;;;EP_CHECK_FOR_UPDATES
;y %R:1814%
;;;EP_INSTALL_UPDATES
;y %R:1815% 🡕
;https://github.com/valinet/ExplorerPatcher/blob/master/CHANGELOG.md
;y %R:1816% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Configure-updates
;T %R:1901%
;e %R:1902%
;y %R:1903% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/About-advanced-settings
;q
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1904%
"AllocConsole"=dword:00000000
;b %R:1905%
"Memcheck"=dword:00000000
;b %R:1906%
"TaskbarAutohideOnDoubleClick"=dword:00000000
[HKEY_CURRENT_USER\Control Panel\Desktop]
;b %R:1907% *
"PaintDesktopVersion"=dword:00000000
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1908% *
"ClassicThemeMitigations"=dword:00000000
[-HKEY_CURRENT_USER\Software\Classes\CLSID\{1eeb5b5a-06fb-4732-96b3-975c0194eb39}\InprocServer32]
;d %R:1909% *
@=""
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;b %R:1910%
"NoPropertiesInContextMenu"=dword:00000000
;b %R:1911% *
"EnableSymbolDownload"=dword:00000001
;b %R:1912% *
"PinnedItemsActAsQuickLaunch"=dword:00000000
;b %R:1913% *
"RemoveExtraGapAroundPinnedItems"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ExplorerPatcher]
;b %R:1927% *
"XamlSounds"=dword:00000000
;T %R:2301%
[HKEY_CURRENT_USER\Software\ExplorerPatcher]
;z 10001 %R:1533%
"Language"=dword:00000000
;y %R:2011% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Settings-management
;u %R:2012%
;import
;u %R:2013%
;export
;u %R:2015%
;reset
;u %R:2102%
;uninstall
;T %R:2001%
;e %R:201%
;e %VERSIONINFORMATIONSTRING%
;t © 2006-2025 VALINET Solutions SRL. All rights reserved.
;e
;e %R:2003%
;e %R:2004%
;t %OSVERSIONSTRING%
;y %R:2006% (https://github.com/valinet) 🡕
;https://github.com/valinet
;q
;y %R:2007% (https://www.valinet.ro) 🡕
;https://www.valinet.ro
;y %R:2009% 🡕
;https://github.com/valinet/ExplorerPatcher#donate
;y %R:2010% 🡕
;https://github.com/valinet/ExplorerPatcher/wiki/Frequently-asked-questions
;f
;u %R:2201% (*)
;restart

1270
ep_setup/ep_setup.c

File diff suppressed because it is too large Load Diff

286
ep_setup/ep_setup.vcxproj

@ -17,6 +17,14 @@
<Configuration>Release</Configuration> <Configuration>Release</Configuration>
<Platform>x64</Platform> <Platform>x64</Platform>
</ProjectConfiguration> </ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup> </ItemGroup>
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion> <VCProjectVersion>16.0</VCProjectVersion>
@ -24,31 +32,46 @@
<ProjectGuid>{2fd40b09-f224-4e9a-b2fe-a22b50b2debf}</ProjectGuid> <ProjectGuid>{2fd40b09-f224-4e9a-b2fe-a22b50b2debf}</ProjectGuid>
<RootNamespace>epsetup</RootNamespace> <RootNamespace>epsetup</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<GitCommitHashShort>0000000</GitCommitHashShort>
<WithEncryption>false</WithEncryption>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries> <UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
</PropertyGroup> </PropertyGroup>
@ -69,22 +92,36 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup> </ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" /> <PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental> <LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental> <LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> <OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\$(Configuration)\$(Platform)\</OutDir>
</PropertyGroup> </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile> <ClCompile>
@ -93,11 +130,12 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;$(SolutionDir)libs\zlib;$(SolutionDir)libs\zlib\contrib;$(SolutionDir)libs\zlib\build-$(Platform);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\zlib\build-$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -109,13 +147,14 @@
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;$(SolutionDir)libs\zlib;$(SolutionDir)libs\zlib\contrib;$(SolutionDir)libs\zlib\build-$(Platform);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\zlib\build-$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -125,11 +164,12 @@
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;$(SolutionDir)libs\zlib;$(SolutionDir)libs\zlib\contrib;$(SolutionDir)libs\zlib\build-$(Platform);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\zlib\build-$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -141,80 +181,200 @@
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode> <ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;$(SolutionDir)libs\zlib;$(SolutionDir)libs\zlib\contrib;$(SolutionDir)libs\zlib\build-$(Platform);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\zlib\build-$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;$(SolutionDir)libs\zlib;$(SolutionDir)libs\zlib\contrib;$(SolutionDir)libs\zlib\build-$(Platform);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\zlib\build-$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalIncludeDirectories>$(SolutionDir)libs\libvalinet;$(SolutionDir)libs\zlib;$(SolutionDir)libs\zlib\contrib;$(SolutionDir)libs\zlib\build-$(Platform);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(SolutionDir)libs\zlib\build-$(Platform)\$(Configuration)\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>EP_BUILD_SETUP;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(WithEncryption)' == 'true'">
<ClCompile>
<PreprocessorDefinitions>WITH_ENCRYPTION;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
<ResourceCompile>
<PreprocessorDefinitions>PLATFORM_AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Platform)'=='ARM64'">
<ResourceCompile>
<PreprocessorDefinitions>PLATFORM_ARM64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile>
</ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\ExplorerPatcher\utility.c" /> <ClCompile Include="..\ExplorerPatcher\utility.c" />
<ClCompile Include="ep_setup.c" /> <ClCompile Include="ep_setup.c" />
<ClCompile Include="..\libs\zlib\contrib\minizip\ioapi.c" />
<ClCompile Include="..\libs\zlib\contrib\minizip\unzip.c">
<PreprocessorDefinitions>NOCRYPT;NOUNCRYPT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\ExplorerPatcher\utility.h" /> <ClInclude Include="..\ExplorerPatcher\utility.h" />
<ClInclude Include="resource.h" /> <ClInclude Include="resources\resource.h" />
<ClInclude Include="rijndael-alg-fst.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ResourceCompile Include="ep_setup.rc"> <ResourceCompile Include="resources\ep_setup.rc">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)'=='Debug'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</ResourceCompile> </ResourceCompile>
<ResourceCompile Include="ep_setup_debug.rc"> <ResourceCompile Include="resources\ep_setup_debug.rc">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)'=='Release'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ResourceCompile> </ResourceCompile>
<ResourceCompile Include="resources\lang\ep_setup.*.rc" />
<ResourceCompile Include="..\ExplorerPatcher-L10N\resources\lang\ep_setup.*.rc" Condition="Exists('..\ExplorerPatcher-L10N\resources\lang')" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\build\Debug\ep_dwm.exe">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="..\build\Debug\ep_weather_host.dll">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="..\build\Debug\ep_weather_host_stub.dll">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="..\build\Debug\ExplorerPatcher.amd64.dll">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="..\build\Debug\ExplorerPatcher.IA-32.dll">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</None>
<None Include="..\build\Release\ep_dwm.exe">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</ExcludedFromBuild>
</None>
<None Include="..\build\Release\ep_weather_host.dll">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</None>
<None Include="..\build\Release\ep_weather_host_stub.dll">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</None>
<None Include="..\build\Release\ExplorerPatcher.amd64.dll">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</None>
<None Include="..\build\Release\ExplorerPatcher.IA-32.dll">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</None>
<None Include="applicat.bin" /> <None Include="applicat.bin" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackFile Include="resources\files\**" />
<PackFile Include="..\build\$(Configuration)\Win32\ExplorerPatcher.IA-32.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\Win32\ExplorerPatcher.IA-32.dll')" />
<PackFile Include="..\build\$(Configuration)\x64\ExplorerPatcher.amd64.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\x64\ExplorerPatcher.amd64.dll')" />
<PackFile Include="..\build\$(Configuration)\ARM64\ExplorerPatcher.arm64.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\ARM64\ExplorerPatcher.arm64.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\WebView2Loader.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\WebView2Loader.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_dwm_svc.exe" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_dwm_svc.exe')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_gui.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_gui.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_startmenu.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_startmenu.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.0.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.0.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.1.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.1.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.2.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.2.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.3.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.3.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.4.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.4.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_taskbar.5.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_taskbar.5.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_weather_host.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_weather_host.dll')" />
<PackFile Include="..\build\$(Configuration)\$(Platform)\ep_weather_host_stub.dll" Condition="Exists('$(SolutionDir)\build\$(Configuration)\$(Platform)\ep_weather_host_stub.dll')" />
</ItemGroup>
<Target Name="GetCommitHash" AfterTargets="PrepareForBuild">
<Exec Command="git rev-parse --short HEAD" Condition="'$(GitCommitHashShort)' == '0000000'">
<Output TaskParameter="ConsoleOutput" PropertyName="GitCommitHashShort" />
</Exec>
<Message Text="Git commit hash: $(GitCommitHashShort)" />
</Target>
<UsingTask TaskName="GenerateAesKey" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<Seed ParameterType="System.String" Required="true" />
<EncryptionKey ParameterType="System.String" Output="true" />
<EncryptionKeyCommaSeparated ParameterType="System.String" Output="true" />
</ParameterGroup>
<Task>
<Code Type="Fragment" Language="cs">
<![CDATA[
using (System.Security.Cryptography.SHA256 sha256 = System.Security.Cryptography.SHA256.Create())
{
byte[] seedBytes = System.Text.Encoding.UTF8.GetBytes(Seed);
byte[] hashBytes = sha256.ComputeHash(seedBytes);
Random random = new System.Random(System.BitConverter.ToInt32(hashBytes, 0));
byte[] keyBytes = new byte[32];
random.NextBytes(keyBytes);
EncryptionKey = System.BitConverter.ToString(keyBytes).Replace("-", "").ToLowerInvariant();
EncryptionKeyCommaSeparated = "0x" + System.BitConverter.ToString(keyBytes).Replace("-", ",0x");
}
]]>
</Code>
</Task>
</UsingTask>
<Target Name="GenerateAesKey" AfterTargets="GetCommitHash">
<GenerateAesKey Seed="$(GitCommitHashShort)" Condition="'$(WithEncryption)' == 'true'">
<Output TaskParameter="EncryptionKey" PropertyName="ZipEncryptionKey" />
<Output TaskParameter="EncryptionKeyCommaSeparated" PropertyName="ZipEncryptionKeyCommaSeparated" />
</GenerateAesKey>
<ItemGroup Condition="'$(WithEncryption)' == 'true'">
<ClCompile>
<PreprocessorDefinitions>ZIP_ENCRYPTION_KEY=$(ZipEncryptionKeyCommaSeparated);%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
<Message Text="Generated AES key: 0x$(ZipEncryptionKey)" Condition="'$(WithEncryption)' == 'true'" />
</Target>
<UsingTask TaskName="EncryptFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
<ParameterGroup>
<OutputFile ParameterType="System.String" />
<EncryptionKey ParameterType="System.String" />
</ParameterGroup>
<Task>
<Code Type="Fragment" Language="cs">
<![CDATA[
using (System.Security.Cryptography.Aes aes = System.Security.Cryptography.Aes.Create())
{
int numChars = EncryptionKey.Length;
byte[] keyBytes = new byte[numChars / 2];
for (int i = 0; i < numChars; i += 2)
{
keyBytes[i / 2] = System.Convert.ToByte(EncryptionKey.Substring(i, 2), 16);
}
aes.Key = keyBytes;
aes.Mode = System.Security.Cryptography.CipherMode.ECB;
using (System.IO.FileStream inputFileStream = new System.IO.FileStream(OutputFile, System.IO.FileMode.Open, System.IO.FileAccess.Read))
using (System.IO.FileStream outputFileStream = new System.IO.FileStream(OutputFile + ".bin", System.IO.FileMode.Create, System.IO.FileAccess.Write))
using (System.Security.Cryptography.ICryptoTransform encryptor = aes.CreateEncryptor())
using (System.Security.Cryptography.CryptoStream cryptoStream = new System.Security.Cryptography.CryptoStream(outputFileStream, encryptor, System.Security.Cryptography.CryptoStreamMode.Write))
{
inputFileStream.CopyTo(cryptoStream);
}
}
]]>
</Code>
</Task>
</UsingTask>
<Target Name="CreateZip" BeforeTargets="ResourceCompile">
<MakeDir Directories="..\build\$(Configuration)\$(Platform)\ep_setup_files" />
<DownloadFile DestinationFolder="..\build\$(Configuration)\$(Platform)\ep_setup_files\pnidui" DestinationFileName="pnidui.dll" SourceUrl="https://msdl.microsoft.com/download/symbols/pnidui.dll/F717CABC20B000/pnidui.dll" SkipUnchangedFiles="true" Retries="3" Condition="'$(Platform)' == 'x64'" />
<DownloadFile DestinationFolder="..\build\$(Configuration)\$(Platform)\ep_setup_files\pnidui" DestinationFileName="pnidui.dll" SourceUrl="https://msdl.microsoft.com/download/symbols/pnidui.dll/63AF842D210000/pnidui.dll" SkipUnchangedFiles="true" Retries="3" Condition="'$(Platform)' == 'ARM64'" />
<DownloadFile DestinationFolder="..\build\$(Configuration)\$(Platform)\ep_setup_files\StartUI" DestinationFileName="StartUI.dll" SourceUrl="https://msdl.microsoft.com/download/symbols/startui.dll/C1AEED44852000/startui.dll" SkipUnchangedFiles="true" Retries="3" Condition="'$(Platform)' == 'x64'" />
<DownloadFile DestinationFolder="..\build\$(Configuration)\$(Platform)\ep_setup_files\StartUI" DestinationFileName="StartUI.dll" SourceUrl="https://msdl.microsoft.com/download/symbols/startui.dll/122A50F3AB9000/startui.dll" SkipUnchangedFiles="true" Retries="3" Condition="'$(Platform)' == 'ARM64'" />
<DownloadFile DestinationFolder="..\build\$(Configuration)\$(Platform)\ep_setup_files\JumpViewUI" DestinationFileName="JumpViewUI.dll" SourceUrl="https://msdl.microsoft.com/download/symbols/jumpviewui.dll/C814664216A000/jumpviewui.dll" SkipUnchangedFiles="true" Retries="3" Condition="'$(Platform)' == 'x64'" />
<DownloadFile DestinationFolder="..\build\$(Configuration)\$(Platform)\ep_setup_files\JumpViewUI" DestinationFileName="JumpViewUI.dll" SourceUrl="https://msdl.microsoft.com/download/symbols/jumpviewui.dll/45558FDB1E9000/jumpviewui.dll" SkipUnchangedFiles="true" Retries="3" Condition="'$(Platform)' == 'ARM64'" />
<Copy SourceFiles="@(PackFile)" DestinationFolder="..\build\$(Configuration)\$(Platform)\ep_setup_files\%(RecursiveDir)" />
<ZipDirectory SourceDirectory="..\build\$(Configuration)\$(Platform)\ep_setup_files" DestinationFile="..\build\$(Configuration)\$(Platform)\ep_setup_files.zip" Overwrite="true" />
<EncryptFile OutputFile="..\build\$(Configuration)\$(Platform)\ep_setup_files.zip" EncryptionKey="$(ZipEncryptionKey)" Condition="'$(WithEncryption)' == 'true'" />
<Copy SourceFiles="..\build\$(Configuration)\$(Platform)\ep_setup_files.zip" DestinationFiles="..\build\$(Configuration)\$(Platform)\ep_setup_files.zip.bin" Condition="'$(WithEncryption)' != 'true'" />
</Target>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"> <ImportGroup Label="ExtensionTargets">
</ImportGroup> </ImportGroup>

18
ep_setup/ep_setup.rc → ep_setup/resources/ep_setup.rc

@ -68,11 +68,11 @@ BEGIN
BEGIN BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", "VALINET Solutions SRL" VALUE "CompanyName", "ExplorerPatcher Developers"
VALUE "FileDescription", "ExplorerPatcher Setup Program" VALUE "FileDescription", "ExplorerPatcher Setup Program"
VER_FILE_STRING VER_FILE_STRING
VALUE "InternalName", "ep_setup.exe" VALUE "InternalName", "ep_setup.exe"
VALUE "LegalCopyright", "Copyright (C) 2006-2022 VALINET Solutions SRL. All rights reserved." VALUE "LegalCopyright", "(C) 2021-2025 ExplorerPatcher Developers. All rights reserved."
VALUE "OriginalFilename", "ep_setup.exe" VALUE "OriginalFilename", "ep_setup.exe"
VALUE "ProductName", "ExplorerPatcher" VALUE "ProductName", "ExplorerPatcher"
VER_PRODUCT_STRING VER_PRODUCT_STRING
@ -90,19 +90,15 @@ END
// RCDATA // RCDATA
// //
IDR_EP_AMD64 RCDATA "..\\build\\Release\\ExplorerPatcher.amd64.dll" #if defined(PLATFORM_AMD64)
IDR_EP_IA32 RCDATA "..\\build\\Release\\ExplorerPatcher.IA-32.dll" IDR_EP_ZIP RCDATA "..\\build\\Release\\x64\\ep_setup_files.zip.bin"
IDR_EP_DWM RCDATA "..\\build\\Release\\ep_dwm.exe" #elif defined(PLATFORM_ARM64)
IDR_EP_WEATHER RCDATA "..\\build\\Release\\ep_weather_host.dll" IDR_EP_ZIP RCDATA "..\\build\\Release\\ARM64\\ep_setup_files.zip.bin"
IDR_EP_WEATHER_STUB RCDATA "..\\build\\Release\\ep_weather_host_stub.dll" #endif
IDR_MS_WEBVIEW2_LOADER RCDATA "..\\build\\Release\\WebView2Loader.dll"
IDR_EP_STARTMENU RCDATA "..\\build\\Release\\ep_startmenu.dll"
#endif // English (United States) resources #endif // English (United States) resources
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

18
ep_setup/ep_setup_debug.rc → ep_setup/resources/ep_setup_debug.rc

@ -68,11 +68,11 @@ BEGIN
BEGIN BEGIN
BLOCK "040904b0" BLOCK "040904b0"
BEGIN BEGIN
VALUE "CompanyName", "VALINET Solutions SRL" VALUE "CompanyName", "ExplorerPatcher Developers"
VALUE "FileDescription", "ExplorerPatcher Setup Program (Debug Build)" VALUE "FileDescription", "ExplorerPatcher Setup Program (Debug Build)"
VER_FILE_STRING VER_FILE_STRING
VALUE "InternalName", "ep_setup.exe" VALUE "InternalName", "ep_setup.exe"
VALUE "LegalCopyright", "Copyright (C) 2006-2022 VALINET Solutions SRL. All rights reserved." VALUE "LegalCopyright", "(C) 2021-2025 ExplorerPatcher Developers. All rights reserved."
VALUE "OriginalFilename", "ep_setup.exe" VALUE "OriginalFilename", "ep_setup.exe"
VALUE "ProductName", "ExplorerPatcher" VALUE "ProductName", "ExplorerPatcher"
VER_PRODUCT_STRING VER_PRODUCT_STRING
@ -90,19 +90,15 @@ END
// RCDATA // RCDATA
// //
IDR_EP_AMD64 RCDATA "..\\build\\Debug\\ExplorerPatcher.amd64.dll" #if defined(PLATFORM_AMD64)
IDR_EP_IA32 RCDATA "..\\build\\Debug\\ExplorerPatcher.IA-32.dll" IDR_EP_ZIP RCDATA "..\\build\\Debug\\x64\\ep_setup_files.zip.bin"
IDR_EP_DWM RCDATA "..\\build\\Debug\\ep_dwm.exe" #elif defined(PLATFORM_ARM64)
IDR_EP_WEATHER RCDATA "..\\build\\Debug\\ep_weather_host.dll" IDR_EP_ZIP RCDATA "..\\build\\Debug\\ARM64\\ep_setup_files.zip.bin"
IDR_EP_WEATHER_STUB RCDATA "..\\build\\Debug\\ep_weather_host_stub.dll" #endif
IDR_MS_WEBVIEW2_LOADER RCDATA "..\\build\\Debug\\WebView2Loader.dll"
IDR_EP_STARTMENU RCDATA "..\\build\\Debug\\ep_startmenu.dll"
#endif // English (United States) resources #endif // English (United States) resources
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////

BIN
ep_setup/resources/files/Windows.UI.ShellCommon/StartUI/Assets/Fonts/BitMDL2.ttf

Binary file not shown.

BIN
ep_setup/resources/files/Windows.UI.ShellCommon/StartUI/Assets/Fonts/SkypeUISymbol-Regular.ttf

Binary file not shown.

BIN
ep_setup/resources/files/Windows.UI.ShellCommon/StartUI/Assets/officehub150x150.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

BIN
ep_setup/resources/files/Windows.UI.ShellCommon/StartUI/Assets/officehub71x71.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
ep_setup/resources/files/Windows.UI.ShellCommon/StartUI/Assets/onenote150x150.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save