regedit: Display REG_DWORD_BIG_ENDIAN values.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-03-29 21:56:20 +11:00 committed by Alexandre Julliard
parent 11fcc61b6d
commit 32714ee447
1 changed files with 7 additions and 2 deletions

View File

@ -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;