Module: wine Branch: master Commit: 32714ee4472a2395a5b4d7005ceac8ea3772a601 URL: http://source.winehq.org/git/wine.git/?a=commit;h=32714ee4472a2395a5b4d7005c...
Author: Hugh McMaster hugh.mcmaster@outlook.com Date: Tue Mar 29 21:56:20 2016 +1100
regedit: Display REG_DWORD_BIG_ENDIAN values.
Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
programs/regedit/listview.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/programs/regedit/listview.c b/programs/regedit/listview.c index c0119ff..a305aa4 100644 --- a/programs/regedit/listview.c +++ b/programs/regedit/listview.c @@ -20,6 +20,7 @@ */
#include <windows.h> +#include <winternl.h> #include <commctrl.h> #include <stdlib.h> #include <stdio.h> @@ -167,10 +168,14 @@ static void AddEntryToList(HWND hwndLV, LPWSTR Name, DWORD dwValType, ListView_SetItemTextW(hwndLV, index, 2, g_szValueNotSet); } break; - case REG_DWORD: { + case REG_DWORD: + case REG_DWORD_BIG_ENDIAN: { + DWORD value = *(DWORD*)ValBuf; WCHAR buf[64]; WCHAR format[] = {'0','x','%','0','8','x',' ','(','%','u',')',0}; - wsprintfW(buf, format, *(DWORD*)ValBuf, *(DWORD*)ValBuf); + if (dwValType == REG_DWORD_BIG_ENDIAN) + value = RtlUlongByteSwap(value); + wsprintfW(buf, format, value, value); ListView_SetItemTextW(hwndLV, index, 2, buf); } break;