[SHELL32][CMD][SHLWAPI] Use the openas verb when invoking unknown file types (#7981)

CORE-20184
This commit is contained in:
Whindmar Saksit 2025-05-30 18:46:24 +02:00 committed by GitHub
parent 6dd8e04438
commit d663eb4466
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 249 additions and 170 deletions

View file

@ -54,6 +54,20 @@ RegKeyExists(HKEY hKey, LPCWSTR Path)
return ret;
}
inline UINT
RegQueryDword(HKEY hKey, PCWSTR pszPath, PCWSTR pszName, DWORD *pnVal)
{
DWORD cb = sizeof(*pnVal);
return RegGetValueW(hKey, pszPath, pszName, RRF_RT_REG_DWORD, NULL, pnVal, &cb);
}
inline DWORD
RegGetDword(HKEY hKey, PCWSTR pszPath, PCWSTR pszName, DWORD nDefVal)
{
DWORD nVal;
return RegQueryDword(hKey, pszPath, pszName, &nVal) == ERROR_SUCCESS ? nVal : nDefVal;
}
inline DWORD
RegSetOrDelete(HKEY hKey, LPCWSTR Name, DWORD Type, LPCVOID Data, DWORD Size)
{