Skip to content
This repository has been archived by the owner on Nov 18, 2023. It is now read-only.

Commit

Permalink
Merge branch 'valinet-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
creeper-0910 committed Oct 6, 2023
2 parents 9c47c41 + 2b917d3 commit 735b5b8
Show file tree
Hide file tree
Showing 9 changed files with 439 additions and 244 deletions.
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 @@ -343,10 +343,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 @@ -225,5 +225,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 @@ -2239,126 +2239,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>

#define MAX_LINE_LENGTH 2000
extern HMODULE hModule;
Expand Down
Loading

0 comments on commit 735b5b8

Please sign in to comment.