Commit 7a353e15 authored by Jactry Zeng's avatar Jactry Zeng Committed by Alexandre Julliard

atl: Convert REG_DWORD to a correct type.

parent 6468ffd8
...@@ -280,7 +280,7 @@ static HRESULT do_process_key(LPCOLESTR *pstr, HKEY parent_key, strbuf *buf, BOO ...@@ -280,7 +280,7 @@ static HRESULT do_process_key(LPCOLESTR *pstr, HKEY parent_key, strbuf *buf, BOO
hres = get_word(&iter, buf); hres = get_word(&iter, buf);
if(FAILED(hres)) if(FAILED(hres))
break; break;
dw = wcstol(buf->str, NULL, 10); dw = wcstoul(buf->str, NULL, 10);
lres = RegSetValueExW(hkey, name.len ? name.str : NULL, 0, REG_DWORD, lres = RegSetValueExW(hkey, name.len ? name.str : NULL, 0, REG_DWORD,
(PBYTE)&dw, sizeof(dw)); (PBYTE)&dw, sizeof(dw));
if(lres != ERROR_SUCCESS) { if(lres != ERROR_SUCCESS) {
......
...@@ -49,6 +49,10 @@ static const char textA[] = ...@@ -49,6 +49,10 @@ static const char textA[] =
" val 'dword_unquoted_dec' = d 1 \n" " val 'dword_unquoted_dec' = d 1 \n"
" val 'dword_quoted_hex' = d '0xA' \n" " val 'dword_quoted_hex' = d '0xA' \n"
" val 'dword_unquoted_hex' = d 0xA \n" " val 'dword_unquoted_hex' = d 0xA \n"
" val 'dword_negative' = d -2147483648 \n"
" val 'dword_ulong' = d 2147483649 \n"
" val 'dword_max' = d 4294967295 \n"
" val 'dword_overrange' = d 4294967296 \n"
" val 'binary_quoted' = b 'deadbeef' \n" " val 'binary_quoted' = b 'deadbeef' \n"
" val 'binary_unquoted' = b dead0123 \n" " val 'binary_unquoted' = b dead0123 \n"
" } \n" " } \n"
...@@ -72,6 +76,10 @@ static void test_registrar(void) ...@@ -72,6 +76,10 @@ static void test_registrar(void)
{ "dword_quoted_dec", TRUE, 1 }, { "dword_quoted_dec", TRUE, 1 },
{ "dword_quoted_hex", FALSE, 0xA }, { "dword_quoted_hex", FALSE, 0xA },
{ "dword_unquoted_hex", FALSE, 0xA }, { "dword_unquoted_hex", FALSE, 0xA },
{ "dword_negative", FALSE, -2147483648 },
{ "dword_ulong", TRUE, 2147483649 },
{ "dword_max", TRUE, 4294967295 },
{ "dword_overrange", FALSE, 4294967296 },
}; };
if (!GetProcAddress(GetModuleHandleA("atl.dll"), "AtlAxAttachControl")) if (!GetProcAddress(GetModuleHandleA("atl.dll"), "AtlAxAttachControl"))
......
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