22000.318.38.1: Fixed #410

This commit is contained in:
Valentin Radu
2021-11-18 19:44:01 +02:00
parent aff330cc08
commit 033ad034d5
3 changed files with 27 additions and 6 deletions
+5 -1
View File
@@ -11,7 +11,7 @@ Tested on build 22000.318 and 22000.346 (currently in Windows Insider beta and r
* Functional Windows 10 network flyout
* Functional Windows 10 battery flyout
* Implemented support for Windows 7 battery flyout (#274)
* Implemented `/extract` switch which unpacks the files from `ep_setup.exe` to disk (#396):
* Implemented `/extract` switch which unpacks the files from `ep_setup.exe` to disk (#396) (.1):
* `ep_setup /extract` - extracts `ExplorerPatcher.IA-32.dll` and `ExplorerPatcher.amd64.dll` to current directory
* `ep-setup /extract test` - extracts to `test` folder in current directory
* `ep-setup /extract "C:\test with space"` - extracts to `C:\test with space` directory
@@ -22,6 +22,10 @@ Tested on build 22000.318 and 22000.346 (currently in Windows Insider beta and r
* Improved reliability when invoking Control Center (`Win`+`A`) when the taskbar icon is disabled (the icon should now not reappear anymore sometimes) (#242)
* Small reorganization of some options in "Properties"
#### Fixes
* Windows 10 network and battery flyout should now always launch when the tray icon is clicked (#410) (.1)
## 22000.318.37
Tested on build 22000.318 and 22000.346 (currently in Windows Insider beta and release preview channels).
+19 -2
View File
@@ -462,8 +462,9 @@ POINT GetDefaultWinXPosition(BOOL bUseRcWork, BOOL* lpBottom, BOOL* lpRight, BOO
return point;
}
void TerminateShellExperienceHost()
BOOL TerminateShellExperienceHost()
{
BOOL bRet = FALSE;
WCHAR wszKnownPath[MAX_PATH];
GetWindowsDirectoryW(wszKnownPath, MAX_PATH);
wcscat_s(wszKnownPath, MAX_PATH, L"\\SystemApps\\ShellExperienceHost_cw5n1h2txyewy\\ShellExperienceHost.exe");
@@ -500,6 +501,7 @@ void TerminateShellExperienceHost()
if (!_wcsicmp(wszProcessPath, wszKnownPath))
{
TerminateProcess(hProcess, 0);
bRet = TRUE;
}
CloseHandle(hProcess);
hProcess = NULL;
@@ -511,6 +513,7 @@ void TerminateShellExperienceHost()
CloseHandle(hSnapshot);
}
}
return bRet;
}
long long elapsedCheckForeground = 0;
@@ -546,6 +549,7 @@ DWORD CheckForegroundThread(DWORD dwMode)
{
RegDeleteKeyW(HKEY_CURRENT_USER, _T(SEH_REGPATH));
TerminateShellExperienceHost();
Sleep(100);
}
printf("Ended \"Check foreground window\" thread.\n");
return 0;
@@ -2498,6 +2502,10 @@ HRESULT stobject_CoCreateInstanceHook(
{
if (hCheckForegroundThread)
{
if (WaitForSingleObject(hCheckForegroundThread, 0) == WAIT_TIMEOUT)
{
return E_NOINTERFACE;
}
WaitForSingleObject(hCheckForegroundThread, INFINITE);
CloseHandle(hCheckForegroundThread);
hCheckForegroundThread = NULL;
@@ -2518,6 +2526,8 @@ HRESULT stobject_CoCreateInstanceHook(
RegCloseKey(hKey);
}
TerminateShellExperienceHost();
InvokeFlyout(0, INVOKE_FLYOUT_BATTERY);
Sleep(100);
hCheckForegroundThread = CreateThread(
0,
0,
@@ -2596,6 +2606,10 @@ HRESULT pnidui_CoCreateInstanceHook(
{
if (hCheckForegroundThread)
{
if (WaitForSingleObject(hCheckForegroundThread, 0) == WAIT_TIMEOUT)
{
return E_NOINTERFACE;
}
WaitForSingleObject(hCheckForegroundThread, INFINITE);
CloseHandle(hCheckForegroundThread);
hCheckForegroundThread = NULL;
@@ -2616,6 +2630,8 @@ HRESULT pnidui_CoCreateInstanceHook(
RegCloseKey(hKey);
}
TerminateShellExperienceHost();
InvokeFlyout(0, INVOKE_FLYOUT_NETWORK);
Sleep(100);
hCheckForegroundThread = CreateThread(
0,
0,
@@ -6290,10 +6306,11 @@ void InjectShellExperienceHost()
{
#ifdef _WIN64
HKEY hKey;
if (RegOpenKeyW(HKEY_CURRENT_USER, _T(SEH_REGPATH), &hKey))
if (RegOpenKeyW(HKEY_CURRENT_USER, _T(SEH_REGPATH), &hKey) != ERROR_SUCCESS)
{
return;
}
RegCloseKey(hKey);
HMODULE hQA = LoadLibraryW(L"Windows.UI.QuickActions.dll");
if (hQA)
{
+3 -3
View File
@@ -1,7 +1,7 @@
#define VER_MAJOR 22000
#define VER_MINOR 318
#define VER_BUILD_HI 38
#define VER_BUILD_LO 0
#define VER_BUILD_LO 1
#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.318.38.0"
#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.318.38.0"
#define VER_FILE_STRING VALUE "FileVersion", "22000.318.38.1"
#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.318.38.1"