From 33e659f9db8630d644b4c0c8431f8289c4d46133 Mon Sep 17 00:00:00 2001 From: Valentin Radu Date: Fri, 7 Jan 2022 10:42:08 +0200 Subject: [PATCH] Available symbols download properly on Insider builds --- CHANGELOG.md | 3 ++- ExplorerPatcher/symbols.c | 37 ++++++++++++++++++++++++++++--------- version.h | 6 +++--- 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b900e3a..3af7ca2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,8 @@ Tested on OS build 22000.376. * Fixed a wrong function prototype (5b4bd07#r62018175, thanks @Simplestas) * Protected some state variables from changing internally if modified in the registry until `explorer` is restarted * Fixed a bug that could unexpectedly prevent the [Win]+[Alt]+[D] shortcut from working properly -* Windows 10 language switcher displays correctly when the taskbar is placed in some location other than the bottom of the screen (#629) (.2). +* Windows 10 language switcher displays correctly when the taskbar is placed in some location other than the bottom of the screen (#629) (.2) +* Available symbols download properly on Insider builds (tested on 22526.1000) (.3) ## 22000.376.40 diff --git a/ExplorerPatcher/symbols.c b/ExplorerPatcher/symbols.c index 41fd5de..835a526 100644 --- a/ExplorerPatcher/symbols.c +++ b/ExplorerPatcher/symbols.c @@ -234,7 +234,7 @@ DWORD DownloadSymbols(DownloadSymbolsParams* params) TWINUI_PCSHELL_SB_CNT )) { - printf("[Symbols] Hooking Win+C is not available for this build.\n"); + printf("[Symbols] Hooking Win+C is not available in this build.\n"); DWORD dwZero = 0; RegSetValueExW( hKey, @@ -251,15 +251,33 @@ DWORD DownloadSymbols(DownloadSymbolsParams* params) TWINUI_PCSHELL_SB_CNT - 1 )) { - printf("[Symbols] Failure in reading symbols for \"%s\".\n", twinui_pcshell_sb_dll); - if (params->bVerbose) + printf("[Symbols] Windows 10 window switcher style is not available in this build.\n"); + DWORD dwZero = 0; + RegSetValueExW( + hKey, + TEXT(TWINUI_PCSHELL_SB_7), + 0, + REG_DWORD, + &dwZero, + sizeof(DWORD) + ); + if (VnGetSymbols( + szSettingsPath, + symbols_PTRS.twinui_pcshell_PTRS, + twinui_pcshell_SN, + TWINUI_PCSHELL_SB_CNT - 2 + )) { - FreeLibraryAndExitThread( - hModule, - 5 - ); + printf("[Symbols] Failure in reading symbols for \"%s\".\n", twinui_pcshell_sb_dll); + if (params->bVerbose) + { + FreeLibraryAndExitThread( + hModule, + 5 + ); + } + return 5; } - return 5; } } RegSetValueExW( @@ -856,7 +874,8 @@ BOOL LoadSymbols(symbols_addr* symbols_PTRS, HMODULE hModule) for (UINT i = 0; i < sizeof(symbols_addr) / sizeof(DWORD); ++i) { if (!((DWORD*)symbols_PTRS)[i] && - (((DWORD*)symbols_PTRS) + i) != symbols_PTRS->twinui_pcshell_PTRS + TWINUI_PCSHELL_SB_CNT - 1 + (((DWORD*)symbols_PTRS) + i) != symbols_PTRS->twinui_pcshell_PTRS + TWINUI_PCSHELL_SB_CNT - 1 && + (((DWORD*)symbols_PTRS) + i) != symbols_PTRS->twinui_pcshell_PTRS + TWINUI_PCSHELL_SB_CNT - 2 ) { bNeedToDownload = TRUE; diff --git a/version.h b/version.h index 946aef3..d5b1a80 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define VER_MAJOR 22000 #define VER_MINOR 376 #define VER_BUILD_HI 41 -#define VER_BUILD_LO 2 +#define VER_BUILD_LO 3 #define VER_FLAGS VS_FF_PRERELEASE @@ -12,5 +12,5 @@ #define VER_STR(arg) #arg // The String form of the version numbers -#define VER_FILE_STRING VALUE "FileVersion", "22000.376.41.2" -#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.376.41.2" +#define VER_FILE_STRING VALUE "FileVersion", "22000.376.41.3" +#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.376.41.3"