mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-12-18 02:16:00 +01:00
Start10: Use the latest known good JumpViewUI.dll on 22H2 and up
This commit is contained in:
parent
ac10697103
commit
4978024ea4
@ -1412,6 +1412,7 @@ int WINAPI wWinMain(
|
|||||||
|
|
||||||
// C:\Windows\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy
|
// C:\Windows\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy
|
||||||
// + dxgi.dll
|
// + dxgi.dll
|
||||||
|
// + JumpViewUI_.dll (download, optional)
|
||||||
// + StartUI_.dll (download, optional)
|
// + StartUI_.dll (download, optional)
|
||||||
// + wincorlib.dll
|
// + wincorlib.dll
|
||||||
// + wincorlib_orig.dll (symlink)
|
// + wincorlib_orig.dll (symlink)
|
||||||
@ -1442,6 +1443,7 @@ int WINAPI wWinMain(
|
|||||||
bOk = CreateSymbolicLinkW(wszSymLinkPath, wszOrigPath, 0);
|
bOk = CreateSymbolicLinkW(wszSymLinkPath, wszOrigPath, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bOk) bOk = InstallResource(bInstall && bUnpackCustomStartUI, hInstance, zipFile, "JumpViewUI/JumpViewUI.dll", wszPath, L"JumpViewUI_.dll");
|
||||||
if (bOk) bOk = InstallResource(bInstall && bUnpackCustomStartUI, hInstance, zipFile, "StartUI/StartUI.dll", wszPath, L"StartUI_.dll");
|
if (bOk) bOk = InstallResource(bInstall && bUnpackCustomStartUI, hInstance, zipFile, "StartUI/StartUI.dll", wszPath, L"StartUI_.dll");
|
||||||
|
|
||||||
// Delete remnants from earlier versions
|
// Delete remnants from earlier versions
|
||||||
|
@ -386,6 +386,8 @@
|
|||||||
<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\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/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\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)" />
|
<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" />
|
<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'" />
|
<EncryptFile OutputFile="..\build\$(Configuration)\$(Platform)\ep_setup_files.zip" EncryptionKey="$(ZipEncryptionKey)" Condition="'$(WithEncryption)' == 'true'" />
|
||||||
|
@ -10,6 +10,8 @@ HMODULE hModule = NULL;
|
|||||||
HMODULE hOrig = NULL;
|
HMODULE hOrig = NULL;
|
||||||
SRWLOCK lockInstanced = { .Ptr = SRWLOCK_INIT };
|
SRWLOCK lockInstanced = { .Ptr = SRWLOCK_INIT };
|
||||||
BOOL bInstanced = FALSE;
|
BOOL bInstanced = FALSE;
|
||||||
|
BOOL g_bIsUsingOwnJumpViewUI = FALSE;
|
||||||
|
BOOL g_bIsUsingOwnStartUI = FALSE;
|
||||||
|
|
||||||
DEFINE_GUID(IID_StartDocked_App, 0x4C2CAEAD, 0x9DA8, 0x30EC, 0xB6, 0xD3, 0xCB, 0xD5, 0x74, 0xED, 0xCB, 0x35); // 4C2CAEAD-9DA8-30EC-B6D3-CBD574EDCB35
|
DEFINE_GUID(IID_StartDocked_App, 0x4C2CAEAD, 0x9DA8, 0x30EC, 0xB6, 0xD3, 0xCB, 0xD5, 0x74, 0xED, 0xCB, 0x35); // 4C2CAEAD-9DA8-30EC-B6D3-CBD574EDCB35
|
||||||
DEFINE_GUID(IID_StartUI_App, 0x1ECDC9E0, 0xBDB1, 0x3551, 0x8C, 0xEE, 0x4B, 0x77, 0x54, 0x0C, 0x44, 0xB3); // 1ECDC9E0-BDB1-3551-8CEE-4B77540C44B3
|
DEFINE_GUID(IID_StartUI_App, 0x1ECDC9E0, 0xBDB1, 0x3551, 0x8C, 0xEE, 0x4B, 0x77, 0x54, 0x0C, 0x44, 0xB3); // 1ECDC9E0-BDB1-3551-8CEE-4B77540C44B3
|
||||||
@ -39,6 +41,7 @@ BOOL GetStartUIName(WCHAR* out, int cch)
|
|||||||
wcscpy_s(szPath, MAX_PATH, L"StartUI_.dll");
|
wcscpy_s(szPath, MAX_PATH, L"StartUI_.dll");
|
||||||
if (FileExistsW(szPath))
|
if (FileExistsW(szPath))
|
||||||
{
|
{
|
||||||
|
g_bIsUsingOwnStartUI = TRUE;
|
||||||
if (out && cch)
|
if (out && cch)
|
||||||
wcscpy_s(out, cch, szPath);
|
wcscpy_s(out, cch, szPath);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -120,6 +123,15 @@ void Init()
|
|||||||
{
|
{
|
||||||
// VnPatchIAT(GetModuleHandleW(NULL), "api-ms-win-core-sysinfo-l1-2-0.dll", "GetProductInfo", start_GetProductInfo);
|
// VnPatchIAT(GetModuleHandleW(NULL), "api-ms-win-core-sysinfo-l1-2-0.dll", "GetProductInfo", start_GetProductInfo);
|
||||||
PatchXamlMetaDataProviderGuid();
|
PatchXamlMetaDataProviderGuid();
|
||||||
|
if (g_bIsUsingOwnStartUI)
|
||||||
|
{
|
||||||
|
LoadLibraryW(g_szStartUIName);
|
||||||
|
}
|
||||||
|
if (FileExistsW(L"JumpViewUI_.dll"))
|
||||||
|
{
|
||||||
|
LoadLibraryW(L"JumpViewUI_.dll");
|
||||||
|
g_bIsUsingOwnJumpViewUI = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
HMODULE hMod;
|
HMODULE hMod;
|
||||||
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, hModule, &hMod);
|
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, hModule, &hMod);
|
||||||
@ -152,6 +164,7 @@ wchar_t* GetCmdArguments(int* a1)
|
|||||||
|
|
||||||
extern HRESULT LoadOurShellCommonPri();
|
extern HRESULT LoadOurShellCommonPri();
|
||||||
extern HRESULT GetActivationFactoryByPCWSTR_InStartUI(PCWSTR activatableClassId, REFIID riid, void** ppv);
|
extern HRESULT GetActivationFactoryByPCWSTR_InStartUI(PCWSTR activatableClassId, REFIID riid, void** ppv);
|
||||||
|
extern HRESULT GetActivationFactoryByPCWSTR_InJumpViewUI(PCWSTR activatableClassId, REFIID riid, void** ppv);
|
||||||
|
|
||||||
#pragma comment(linker, "/export:?GetActivationFactoryByPCWSTR@@YAJPEAXAEAVGuid@Platform@@PEAPEAX@Z=GetActivationFactoryByPCWSTR,@129")
|
#pragma comment(linker, "/export:?GetActivationFactoryByPCWSTR@@YAJPEAXAEAVGuid@Platform@@PEAPEAX@Z=GetActivationFactoryByPCWSTR,@129")
|
||||||
HRESULT GetActivationFactoryByPCWSTR(PCWSTR activatableClassId, REFIID riid, void** ppv)
|
HRESULT GetActivationFactoryByPCWSTR(PCWSTR activatableClassId, REFIID riid, void** ppv)
|
||||||
@ -185,11 +198,17 @@ HRESULT GetActivationFactoryByPCWSTR(PCWSTR activatableClassId, REFIID riid, voi
|
|||||||
return GetActivationFactoryByPCWSTR_InStartUI(L"StartUI.startui_XamlTypeInfo.XamlMetaDataProvider", riid, ppv);
|
return GetActivationFactoryByPCWSTR_InStartUI(L"StartUI.startui_XamlTypeInfo.XamlMetaDataProvider", riid, ppv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (wcsncmp(activatableClassId, L"StartUI.", 8) == 0)
|
||||||
if (wcsncmp(activatableClassId, L"StartUI.", 8) == 0)
|
|
||||||
{
|
{
|
||||||
return GetActivationFactoryByPCWSTR_InStartUI(activatableClassId, riid, ppv);
|
return GetActivationFactoryByPCWSTR_InStartUI(activatableClassId, riid, ppv);
|
||||||
}
|
}
|
||||||
|
else if (wcsncmp(activatableClassId, L"JumpViewUI.", 11) == 0)
|
||||||
|
{
|
||||||
|
if (g_bIsUsingOwnJumpViewUI)
|
||||||
|
{
|
||||||
|
return GetActivationFactoryByPCWSTR_InJumpViewUI(activatableClassId, riid, ppv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return pGetActivationFactoryByPCWSTR(activatableClassId, riid, ppv);
|
return pGetActivationFactoryByPCWSTR(activatableClassId, riid, ppv);
|
||||||
}
|
}
|
||||||
|
@ -93,3 +93,27 @@ extern "C" HRESULT GetActivationFactoryByPCWSTR_InStartUI(PCWSTR activatableClas
|
|||||||
|
|
||||||
return activationFactory.CopyTo(riid, ppv);
|
return activationFactory.CopyTo(riid, ppv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" HRESULT GetActivationFactoryByPCWSTR_InJumpViewUI(PCWSTR activatableClassId, REFIID riid, void** ppv)
|
||||||
|
{
|
||||||
|
typedef HRESULT (WINAPI* DllGetActivationFactory_t)(HSTRING, IActivationFactory**);
|
||||||
|
static DllGetActivationFactory_t pfnGetActivationFactory;
|
||||||
|
if (!pfnGetActivationFactory)
|
||||||
|
{
|
||||||
|
HMODULE hModule = GetModuleHandleW(L"JumpViewUI_.dll");
|
||||||
|
if (hModule)
|
||||||
|
{
|
||||||
|
pfnGetActivationFactory = (DllGetActivationFactory_t)GetProcAddress(hModule, "DllGetActivationFactory");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pfnGetActivationFactory)
|
||||||
|
return E_FAIL;
|
||||||
|
|
||||||
|
ComPtr<IActivationFactory> activationFactory;
|
||||||
|
HRESULT hr = pfnGetActivationFactory(Wrappers::HStringReference(activatableClassId).Get(), &activationFactory);
|
||||||
|
if (FAILED(hr))
|
||||||
|
return hr;
|
||||||
|
|
||||||
|
return activationFactory.CopyTo(riid, ppv);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user