1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-11-28 01:10:55 +01:00

General: Fixed a bug that could prevent the battery or network flyouts from showing

This commit is contained in:
Valentin Radu 2022-10-02 23:29:59 +03:00
parent 33d1518977
commit 556aeb5aae

View File

@ -3908,15 +3908,16 @@ HRESULT stobject_CoCreateInstanceHook(
DWORD dwVal = 0, dwSize = sizeof(DWORD); DWORD dwVal = 0, dwSize = sizeof(DWORD);
if (IsEqualGUID(rclsid, &CLSID_ImmersiveShell) && if (IsEqualGUID(rclsid, &CLSID_ImmersiveShell) &&
IsEqualGUID(riid, &IID_IServiceProvider) && IsEqualGUID(riid, &IID_IServiceProvider) &&
SHRegGetValueFromHKCUHKLMFunc && SHRegGetValueFromHKCUHKLMFunc( SHRegGetValueFromHKCUHKLMFunc)
{
SHRegGetValueFromHKCUHKLMFunc(
TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ImmersiveShell"), TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\ImmersiveShell"),
TEXT("UseWin32BatteryFlyout"), TEXT("UseWin32BatteryFlyout"),
SRRF_RT_REG_DWORD, SRRF_RT_REG_DWORD,
NULL, NULL,
&dwVal, &dwVal,
(LPDWORD)(&dwSize) (LPDWORD)(&dwSize)
) == ERROR_SUCCESS) );
{
if (!dwVal) if (!dwVal)
{ {
if (hCheckForegroundThread) if (hCheckForegroundThread)
@ -3982,15 +3983,16 @@ HRESULT pnidui_CoCreateInstanceHook(
DWORD dwVal = 0, dwSize = sizeof(DWORD); DWORD dwVal = 0, dwSize = sizeof(DWORD);
if (IsEqualGUID(rclsid, &CLSID_ImmersiveShell) && if (IsEqualGUID(rclsid, &CLSID_ImmersiveShell) &&
IsEqualGUID(riid, &IID_IServiceProvider) && IsEqualGUID(riid, &IID_IServiceProvider) &&
SHRegGetValueFromHKCUHKLMFunc && SHRegGetValueFromHKCUHKLMFunc( SHRegGetValueFromHKCUHKLMFunc)
{
SHRegGetValueFromHKCUHKLMFunc(
TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Settings\\Network"), TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\Settings\\Network"),
TEXT("ReplaceVan"), TEXT("ReplaceVan"),
SRRF_RT_REG_DWORD, SRRF_RT_REG_DWORD,
NULL, NULL,
&dwVal, &dwVal,
(LPDWORD)(&dwSize) (LPDWORD)(&dwSize)
) == ERROR_SUCCESS) );
{
if (dwVal) if (dwVal)
{ {
if (dwVal == 5 || dwVal == 6) if (dwVal == 5 || dwVal == 6)