Commit 03767793 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

winedump: Support REG_BINARY values in regf files.

parent 814d8d74
......@@ -192,8 +192,8 @@ static BOOL dump_subkeys(unsigned int hive_off, unsigned int off)
static BOOL dump_value(unsigned int hive_off, unsigned int off)
{
unsigned int i, len, data_size;
const void *data = NULL;
unsigned int data_size;
const value_key *val;
const char *name;
......@@ -246,6 +246,25 @@ static BOOL dump_value(unsigned int hive_off, unsigned int off)
printf("%s", !data ? "\"\"" :
get_unicode_str((const WCHAR *)data, data_size / sizeof(WCHAR)));
break;
case REG_BINARY:
printf("hex:");
len = val->name_size + 7; /* strlen("\"\"=hex:") */
for (i = 0; i < data_size; i++)
{
if (i)
{
printf(",");
len += 1;
}
if (len > 76)
{
printf("\\\n ");
len = 2;
}
printf("%02x", ((BYTE *)data)[i]);
len += 2;
}
break;
case REG_DWORD:
assert(data_size == sizeof(DWORD));
printf("dword:%08x", *(unsigned int *)data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment