[EXPLORER][BROWSEUI][SHLWAPI][BOOTDATA][WIN32K] Support AppKeys and more WM_APPCOMMANDs (#7879)

Implements a couple of extra commands in IShellBrowser and adds support for the AppKeys fallback registry key (used when the foreground application does not handle the command).
This commit is contained in:
Whindmar Saksit 2025-04-18 18:35:30 +02:00 committed by GitHub
parent 2e85425c53
commit 5a10ec60be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 219 additions and 61 deletions

View file

@ -426,6 +426,19 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
return hResult;
}
static HRESULT UpdateRegistryFromResource(BOOL Register)
{
static const BYTE resid[] =
{
IDR_FOLDEROPTIONS,
IDR_EXPLORER,
};
HRESULT hr = S_OK;
for (SIZE_T i = 0; i < _countof(resid) && SUCCEEDED(hr); ++i)
hr = gModule.UpdateRegistryFromResource(resid[i], Register, NULL);
return hr;
}
/***********************************************************************
* DllRegisterServer (SHELL32.@)
*/
@ -437,8 +450,7 @@ STDAPI DllRegisterServer()
if (FAILED(hr))
return hr;
hr = gModule.UpdateRegistryFromResource(IDR_FOLDEROPTIONS, TRUE, NULL);
if (FAILED(hr))
if (FAILED(hr = UpdateRegistryFromResource(TRUE)))
return hr;
hr = SHELL_RegisterShellFolders();
@ -459,8 +471,7 @@ STDAPI DllUnregisterServer()
if (FAILED(hr))
return hr;
hr = gModule.UpdateRegistryFromResource(IDR_FOLDEROPTIONS, FALSE, NULL);
if (FAILED(hr))
if (FAILED(hr = UpdateRegistryFromResource(FALSE)))
return hr;
return S_OK;