Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
zetaloop committed Oct 6, 2023
2 parents 2f9c20e + dca4057 commit 605ad61
Show file tree
Hide file tree
Showing 13 changed files with 465 additions and 281 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ Tested on OS builds 22000.2416, 22621.1, 22621.2134, 22621.2361, 22631.2338, and
* 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)

Many thanks to @Amrsatrio for sustained efforts in maintaining and improving ExplorerPatcher.

## 22621.2283.57

Tested on OS build 22621.2283. Installer requires Internet connectivity.
Expand Down
16 changes: 12 additions & 4 deletions ExplorerPatcher/ExplorerPatcher.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<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>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -345,10 +345,18 @@
<ResourceCompile Include="ExplorerPatcher.rc" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="settings.reg" />
<None Include="settings10.reg" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets" Condition="Exists('..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" />
</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.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.ImplementationLibrary.1.0.230824.2\build\native\Microsoft.Windows.ImplementationLibrary.targets'))" />
</Target>
</Project>
3 changes: 2 additions & 1 deletion ExplorerPatcher/ExplorerPatcher.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -231,5 +231,6 @@
<None Include="settings10.reg">
<Filter>Settings</Filter>
</None>
<None Include="packages.config" />
</ItemGroup>
</Project>
</Project>
120 changes: 0 additions & 120 deletions ExplorerPatcher/GUI.c
Original file line number Diff line number Diff line change
Expand Up @@ -2244,126 +2244,6 @@ static BOOL GUI_Build(HDC hDC, HWND hwnd, POINT pt)
}
}
}
else if (!strncmp(line + 1, "pin_tiles", 9))
{
BOOL bFirst = TRUE;
DWORD dwPermitOldStartTileData = TRUE;
DWORD dwSize = sizeof(DWORD);
RegSetKeyValueW(HKEY_CURRENT_USER, L"Software\\ExplorerPatcher", L"PermitOldStartTileDataOneShot", REG_DWORD, &dwPermitOldStartTileData, dwSize);
/*
LPCWSTR csPath = L"::{26EE0668-A00A-44D7-9371-BEB064C98683}";
SFGAOF stSFGAOFIn = 0;
SFGAOF stSFGAOFOut = 0;
SHParseDisplayName(csPath, NULL, &pidl, stSFGAOFIn, &stSFGAOFOut);
*/
WCHAR wszOrigPath[MAX_PATH], wszCurPath[MAX_PATH];
IShellFolder* psfDesktop = NULL;
hr = SHGetDesktopFolder(&psfDesktop);
if (psfDesktop)
{
LPITEMIDLIST pidl;
hr = SHGetFolderLocation(NULL, CSIDL_CONTROLS, (HANDLE)-1, 0, &pidl);
if (pidl)
{
STRRET strret;
hr = psfDesktop->lpVtbl->GetDisplayNameOf(psfDesktop, pidl, SHGDN_FORPARSING, &strret);
StrRetToBufW(&strret, pidl, wszOrigPath, MAX_PATH);
SHOpenFolderAndSelectItems(pidl, 0, NULL, 0);
VARIANT vt;
HRESULT hr = E_FAIL;
IShellWindows* pShellWindows = NULL;
hr = CoCreateInstance(&CLSID_ShellWindows, NULL, CLSCTX_ALL, &IID_IShellWindows, &pShellWindows);
if (pShellWindows)
{
long k = 0;
pShellWindows->lpVtbl->get_Count(pShellWindows, &k);
for (int i = 0; i < k; ++i)
{
vt.vt = VT_I4;
vt.intVal = i;
IDispatch* pDispatch = NULL;
hr = pShellWindows->lpVtbl->Item(pShellWindows, vt, &pDispatch);
if (pDispatch)
{
IWebBrowserApp* pWebBrowserApp = NULL;
hr = pDispatch->lpVtbl->QueryInterface(pDispatch, &IID_IWebBrowserApp, &pWebBrowserApp);
if (pWebBrowserApp)
{
IServiceProvider* pServiceProvider = NULL;
hr = pWebBrowserApp->lpVtbl->QueryInterface(pWebBrowserApp, &IID_IServiceProvider, &pServiceProvider);
if (pServiceProvider)
{
IShellBrowser* pShellBrowser = NULL;
hr = pServiceProvider->lpVtbl->QueryService(pServiceProvider, &SID_STopLevelBrowser, &IID_IShellBrowser, &pShellBrowser);
if (pShellBrowser)
{
IShellView* pShellView = NULL;
hr = pShellBrowser->lpVtbl->QueryActiveShellView(pShellBrowser, &pShellView);
if (pShellView)
{
IFolderView* pFolderView = NULL;
hr = pShellView->lpVtbl->QueryInterface(pShellView, &IID_IFolderView, &pFolderView);
if (pFolderView)
{
IPersistFolder2* pPersistFolder2 = NULL;
hr = pFolderView->lpVtbl->GetFolder(pFolderView, &IID_IPersistFolder2, &pPersistFolder2);
if (pPersistFolder2)
{
LPITEMIDLIST pCur = NULL;
hr = pPersistFolder2->lpVtbl->GetCurFolder(pPersistFolder2, &pCur);
if (pCur)
{
hr = psfDesktop->lpVtbl->GetDisplayNameOf(psfDesktop, pCur, SHGDN_FORPARSING, &strret);
StrRetToBufW(&strret, pidl, wszCurPath, MAX_PATH);
if (!_wcsnicmp(wszOrigPath, wszCurPath, 40) && wcslen(wszCurPath) == 40 && bFirst)
{
LPITEMIDLIST pNew = NULL;
hr = SHGetFolderLocation(NULL, CSIDL_DRIVES, (HANDLE)-1, 0, &pNew);
if (pNew)
{
hr = pShellBrowser->lpVtbl->BrowseObject(pShellBrowser, pNew, SBSP_SAMEBROWSER);
if (SUCCEEDED(hr))
{
HWND hWndExp = NULL;
pWebBrowserApp->lpVtbl->get_HWND(pWebBrowserApp, &hWndExp);
if (hWndExp)
{
INPUT input;
ZeroMemory(&input, sizeof(INPUT));
input.type = INPUT_KEYBOARD;
input.ki.wVk = VK_F5;
SetForegroundWindow(hWndExp);
SendInput(1, &input, sizeof(INPUT));
bFirst = FALSE;
}
}
CoTaskMemFree(pNew);
}
}
CoTaskMemFree(pCur);
}
pPersistFolder2->lpVtbl->Release(pPersistFolder2);
}
pFolderView->lpVtbl->Release(pFolderView);
}
pShellView->lpVtbl->Release(pShellView);
}
pShellBrowser->lpVtbl->Release(pShellBrowser);
}
pServiceProvider->lpVtbl->Release(pServiceProvider);
}
pWebBrowserApp->lpVtbl->Release(pWebBrowserApp);
}
pDispatch->lpVtbl->Release(pDispatch);
}
}
pShellWindows->lpVtbl->Release(pShellWindows);
}
CoTaskMemFree(pidl);
}
psfDesktop->lpVtbl->Release(psfDesktop);
}
}
else if (!strncmp(line + 1, "spotlight_menu", 14))
{
POINT p;
Expand Down
2 changes: 0 additions & 2 deletions ExplorerPatcher/GUI.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#include "utility.h"
#include "../ep_weather_host/ep_weather.h"
#include "../ep_weather_host/ep_weather_host_h.h"
#include <ExDisp.h>
#include <ShlGuid.h>
#include "helper.h"

#define MAX_LINE_LENGTH 2000
Expand Down
Loading

0 comments on commit 605ad61

Please sign in to comment.