https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0b6775505ad2463362072…
commit 0b6775505ad24633620725513273ba550afb1962
Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com>
AuthorDate: Wed Dec 21 13:42:36 2022 +0100
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Dec 21 15:42:36 2022 +0300
[NTOBJSHEX] Fix displayed registry value type and icon (#4949)
- RegistryTypeNames[]: Remove an unwanted space
- CRegistryFolderExtractIcon::GetIconLocation():
Add the REG_ENTRY_VALUE_WITH_CONTENT case
- CRegistryFolder::GetDetailsOf(): Fix copypasta
- CRegistryFolder::FormatValueData(): Fix magic constant
CORE-18747
---
dll/shellext/ntobjshex/ntobjenum.cpp | 2 +-
dll/shellext/ntobjshex/regfolder.cpp | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dll/shellext/ntobjshex/ntobjenum.cpp b/dll/shellext/ntobjshex/ntobjenum.cpp
index 62d1b1940b7..1d2c6c5f690 100644
--- a/dll/shellext/ntobjshex/ntobjenum.cpp
+++ b/dll/shellext/ntobjshex/ntobjenum.cpp
@@ -43,7 +43,7 @@ const LPCWSTR RegistryTypeNames [] = {
L"REG_MULTI_SZ",
L"REG_RESOURCE_LIST",
L"REG_FULL_RESOURCE_DESCRIPTOR",
- L"REG_RESOURCE_REQUIREMENTS_LIST ",
+ L"REG_RESOURCE_REQUIREMENTS_LIST",
L"REG_QWORD"
};
diff --git a/dll/shellext/ntobjshex/regfolder.cpp b/dll/shellext/ntobjshex/regfolder.cpp
index e8369f8d24c..83683f05171 100644
--- a/dll/shellext/ntobjshex/regfolder.cpp
+++ b/dll/shellext/ntobjshex/regfolder.cpp
@@ -71,6 +71,7 @@ HRESULT STDMETHODCALLTYPE CRegistryFolderExtractIcon::GetIconLocation(
return S_OK;
case REG_ENTRY_VALUE:
+ case REG_ENTRY_VALUE_WITH_CONTENT:
GetModuleFileNameW(g_hInstance, szIconFile, cchMax);
*piIndex = -IDI_REGISTRYVALUE;
*pwFlags = flags;
@@ -299,7 +300,7 @@ HRESULT STDMETHODCALLTYPE CRegistryFolder::GetDetailsOf(
return MakeStrRetFromString(L"Key", &(psd->str));
}
- return MakeStrRetFromString(RegistryTypeNames[info->entryType],
&(psd->str));
+ return MakeStrRetFromString(RegistryTypeNames[info->contentType],
&(psd->str));
}
case REGISTRY_COLUMN_VALUE:
@@ -490,7 +491,7 @@ HRESULT CRegistryFolder::FormatValueData(DWORD contentType, PVOID td,
DWORD cont
{
switch (contentType)
{
- case 0:
+ case REG_NONE:
{
PCWSTR strTodo = L"";
DWORD bufferLength = (wcslen(strTodo) + 1) * sizeof(WCHAR);