ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
June 2022
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
17 participants
236 discussions
Start a n
N
ew thread
[reactos] 88/158: [WINESYNC] reg: Print a new line when recursing and the current key has no registry values.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3dbd42081e39e2504a92b…
commit 3dbd42081e39e2504a92b223696f2fdb54fedf15 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:15:48 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:34 2022 +0200 [WINESYNC] reg: Print a new line when recursing and the current key has no registry values. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 35ccb87a767394ea3054c8890ad7b245e431290d by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- base/applications/cmdutils/reg/query.c | 2 +- modules/rostests/winetests/reg/query.c | 2 +- sdk/tools/winesync/reg.cfg | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/base/applications/cmdutils/reg/query.c b/base/applications/cmdutils/reg/query.c index 4af6c7f5449..66e54548688 100644 --- a/base/applications/cmdutils/reg/query.c +++ b/base/applications/cmdutils/reg/query.c @@ -262,7 +262,7 @@ static int query_all(HKEY hkey, WCHAR *path, BOOL recurse, BOOL recursing) free(data); free(value_name); - if (i || recurse) + if (i || recursing) output_string(newlineW); subkey_name = malloc(MAX_SUBKEY_LEN * sizeof(WCHAR)); diff --git a/modules/rostests/winetests/reg/query.c b/modules/rostests/winetests/reg/query.c index 4ccbab58cb8..76186794f5e 100644 --- a/modules/rostests/winetests/reg/query.c +++ b/modules/rostests/winetests/reg/query.c @@ -286,7 +286,7 @@ static void test_query(void) read_reg_output("reg query HKCU\\" KEY_BASE " /s", buf, sizeof(buf), &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - compare_query(buf, test8b, FALSE, TODO_REG_COMPARE); + compare_query(buf, test8b, FALSE, 0); delete_tree(HKEY_CURRENT_USER, KEY_BASE); } diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 93f3edc2ae3..bc02cb30a1e 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: ec0a799ea8884479d7b56b81fb9fdd106f1a751b + wine: 35ccb87a767394ea3054c8890ad7b245e431290d
2 years, 6 months
1
0
0
0
[reactos] 87/158: [WINESYNC] reg: Only print the name of the registry key if it contains values or we are recursing.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=14b77379a7668d31e3efe…
commit 14b77379a7668d31e3efe34c66e5ee103743841d Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:15:48 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:33 2022 +0200 [WINESYNC] reg: Only print the name of the registry key if it contains values or we are recursing. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id ec0a799ea8884479d7b56b81fb9fdd106f1a751b by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- base/applications/cmdutils/reg/query.c | 14 ++++++++++---- modules/rostests/winetests/reg/query.c | 2 +- sdk/tools/winesync/reg.cfg | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/base/applications/cmdutils/reg/query.c b/base/applications/cmdutils/reg/query.c index efcd16f8ad5..4af6c7f5449 100644 --- a/base/applications/cmdutils/reg/query.c +++ b/base/applications/cmdutils/reg/query.c @@ -210,9 +210,10 @@ static int query_value(HKEY hkey, WCHAR *value_name, WCHAR *path, BOOL recurse) return 0; } -static int query_all(HKEY hkey, WCHAR *path, BOOL recurse) +static int query_all(HKEY hkey, WCHAR *path, BOOL recurse, BOOL recursing) { LONG rc; + DWORD num_values; DWORD max_value_len = 256, value_len; DWORD max_data_bytes = 2048, data_size; DWORD subkey_len; @@ -221,7 +222,12 @@ static int query_all(HKEY hkey, WCHAR *path, BOOL recurse) BYTE *data; HKEY subkey; - output_string(L"%1\n", path); + rc = RegQueryInfoKeyW(hkey, NULL, NULL, NULL, NULL, NULL, NULL, + &num_values, NULL, NULL, NULL, NULL); + if (rc) return 1; + + if (num_values || recursing) + output_string(L"%1\n", path); value_name = malloc(max_value_len * sizeof(WCHAR)); data = malloc(max_data_bytes); @@ -275,7 +281,7 @@ static int query_all(HKEY hkey, WCHAR *path, BOOL recurse) subkey_path = build_subkey_path(path, path_len, subkey_name, subkey_len); if (!RegOpenKeyExW(hkey, subkey_name, 0, KEY_READ, &subkey)) { - query_all(subkey, subkey_path, recurse); + query_all(subkey, subkey_path, recurse, TRUE); RegCloseKey(subkey); } free(subkey_path); @@ -311,7 +317,7 @@ static int run_query(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name, output_message(STRING_MATCHES_FOUND, num_values_found); } else - ret = query_all(hkey, key_name, recurse); + ret = query_all(hkey, key_name, recurse, FALSE); RegCloseKey(hkey); diff --git a/modules/rostests/winetests/reg/query.c b/modules/rostests/winetests/reg/query.c index a8720da8da1..4ccbab58cb8 100644 --- a/modules/rostests/winetests/reg/query.c +++ b/modules/rostests/winetests/reg/query.c @@ -282,7 +282,7 @@ static void test_query(void) read_reg_output("reg query HKCU\\" KEY_BASE, buf, sizeof(buf), &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - compare_query(buf, test8a, FALSE, TODO_REG_COMPARE); + compare_query(buf, test8a, FALSE, 0); read_reg_output("reg query HKCU\\" KEY_BASE " /s", buf, sizeof(buf), &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index f3c81e9f9a5..93f3edc2ae3 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: f32816268ed5715c5bce20daf9bb20aa194a7127 + wine: ec0a799ea8884479d7b56b81fb9fdd106f1a751b
2 years, 6 months
1
0
0
0
[reactos] 86/158: [WINESYNC] reg: Do not print a line break after querying a registry key.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a3bf868efb409012530ef…
commit a3bf868efb409012530ef510c5f93b65df271d8e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:15:47 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:33 2022 +0200 [WINESYNC] reg: Do not print a line break after querying a registry key. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id f32816268ed5715c5bce20daf9bb20aa194a7127 by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- base/applications/cmdutils/reg/query.c | 4 ---- modules/rostests/winetests/reg/query.c | 2 +- sdk/tools/winesync/reg.cfg | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/base/applications/cmdutils/reg/query.c b/base/applications/cmdutils/reg/query.c index 6485d36db6f..efcd16f8ad5 100644 --- a/base/applications/cmdutils/reg/query.c +++ b/base/applications/cmdutils/reg/query.c @@ -287,10 +287,6 @@ static int query_all(HKEY hkey, WCHAR *path, BOOL recurse) } free(subkey_name); - - if (i && !recurse) - output_string(newlineW); - return 0; } diff --git a/modules/rostests/winetests/reg/query.c b/modules/rostests/winetests/reg/query.c index 34196c77aa4..a8720da8da1 100644 --- a/modules/rostests/winetests/reg/query.c +++ b/modules/rostests/winetests/reg/query.c @@ -225,7 +225,7 @@ static void test_query(void) read_reg_output("reg query HKCU\\" KEY_BASE, buf, sizeof(buf), &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - compare_query(buf, test3, FALSE, TODO_REG_COMPARE); + compare_query(buf, test3, FALSE, 0); add_value(subkey, "Test3", REG_SZ, "Some string data", 16); dword = 0xabc; diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 49aa0a28361..f3c81e9f9a5 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: c809f9462455ffb0e03a9ae4057f0cd47c85ee5d + wine: f32816268ed5715c5bce20daf9bb20aa194a7127
2 years, 6 months
1
0
0
0
[reactos] 85/158: [WINESYNC] reg: Consistently use 'hkey' for HKEY variables.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f0c76942b78de87b6b3a1…
commit f0c76942b78de87b6b3a154dc96a436c98c67007 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:15:47 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:33 2022 +0200 [WINESYNC] reg: Consistently use 'hkey' for HKEY variables. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id c809f9462455ffb0e03a9ae4057f0cd47c85ee5d by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- base/applications/cmdutils/reg/add.c | 18 +++++++++--------- base/applications/cmdutils/reg/delete.c | 16 ++++++++-------- base/applications/cmdutils/reg/export.c | 8 ++++---- base/applications/cmdutils/reg/query.c | 26 +++++++++++++------------- sdk/tools/winesync/reg.cfg | 2 +- 5 files changed, 35 insertions(+), 35 deletions(-) diff --git a/base/applications/cmdutils/reg/add.c b/base/applications/cmdutils/reg/add.c index de22874b901..ff209bfc0ff 100644 --- a/base/applications/cmdutils/reg/add.c +++ b/base/applications/cmdutils/reg/add.c @@ -152,10 +152,10 @@ static LPBYTE get_regdata(const WCHAR *data, DWORD reg_type, WCHAR separator, DW static int run_add(HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty, WCHAR *type, WCHAR separator, WCHAR *data, BOOL force) { - HKEY key; + HKEY hkey; if (RegCreateKeyExW(root, path, 0, NULL, REG_OPTION_NON_VOLATILE, - KEY_READ|KEY_WRITE, NULL, &key, NULL)) + KEY_READ|KEY_WRITE, NULL, &hkey, NULL)) { output_message(STRING_INVALID_KEY); return 1; @@ -169,11 +169,11 @@ static int run_add(HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty, if (!force) { - if (RegQueryValueExW(key, value_name, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) + if (RegQueryValueExW(hkey, value_name, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) { if (!ask_confirm(STRING_OVERWRITE_VALUE, value_name)) { - RegCloseKey(key); + RegCloseKey(hkey); output_message(STRING_CANCELLED); return 0; } @@ -183,28 +183,28 @@ static int run_add(HKEY root, WCHAR *path, WCHAR *value_name, BOOL value_empty, reg_type = wchar_get_type(type); if (reg_type == ~0u) { - RegCloseKey(key); + RegCloseKey(hkey); output_message(STRING_UNSUPPORTED_TYPE, type); return 1; } if ((reg_type == REG_DWORD || reg_type == REG_DWORD_BIG_ENDIAN) && !data) { - RegCloseKey(key); + RegCloseKey(hkey); output_message(STRING_INVALID_CMDLINE); return 1; } if (!(reg_data = get_regdata(data, reg_type, separator, ®_count))) { - RegCloseKey(key); + RegCloseKey(hkey); return 1; } - RegSetValueExW(key, value_name, 0, reg_type, reg_data, reg_count); + RegSetValueExW(hkey, value_name, 0, reg_type, reg_data, reg_count); free(reg_data); } - RegCloseKey(key); + RegCloseKey(hkey); output_message(STRING_SUCCESS); return 0; diff --git a/base/applications/cmdutils/reg/delete.c b/base/applications/cmdutils/reg/delete.c index db1ed0f5337..f8e62e490b9 100644 --- a/base/applications/cmdutils/reg/delete.c +++ b/base/applications/cmdutils/reg/delete.c @@ -21,7 +21,7 @@ static int run_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name, BOOL value_empty, BOOL value_all, BOOL force) { - HKEY key; + HKEY hkey; if (!force) { @@ -53,7 +53,7 @@ static int run_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name return 0; } - if (RegOpenKeyExW(root, path, 0, KEY_READ|KEY_SET_VALUE, &key)) + if (RegOpenKeyExW(root, path, 0, KEY_READ|KEY_SET_VALUE, &hkey)) { output_message(STRING_KEY_NONEXIST); return 1; @@ -70,14 +70,14 @@ static int run_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name while (1) { value_len = max_value_len; - rc = RegEnumValueW(key, 0, value_name, &value_len, NULL, NULL, NULL, NULL); + rc = RegEnumValueW(hkey, 0, value_name, &value_len, NULL, NULL, NULL, NULL); if (rc == ERROR_SUCCESS) { - rc = RegDeleteValueW(key, value_name); + rc = RegDeleteValueW(hkey, value_name); if (rc != ERROR_SUCCESS) { free(value_name); - RegCloseKey(key); + RegCloseKey(hkey); output_message(STRING_VALUEALL_FAILED, key_name); return 1; } @@ -93,15 +93,15 @@ static int run_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name } else if (value_name || value_empty) { - if (RegDeleteValueW(key, value_name)) + if (RegDeleteValueW(hkey, value_name)) { - RegCloseKey(key); + RegCloseKey(hkey); output_message(STRING_VALUE_NONEXIST); return 1; } } - RegCloseKey(key); + RegCloseKey(hkey); output_message(STRING_SUCCESS); return 0; } diff --git a/base/applications/cmdutils/reg/export.c b/base/applications/cmdutils/reg/export.c index 49991c06ee3..dd8071e80c2 100644 --- a/base/applications/cmdutils/reg/export.c +++ b/base/applications/cmdutils/reg/export.c @@ -225,7 +225,7 @@ static void export_key_name(HANDLE hFile, WCHAR *name) free(buf); } -static int export_registry_data(HANDLE hFile, HKEY key, WCHAR *path) +static int export_registry_data(HANDLE hFile, HKEY hkey, WCHAR *path) { LONG rc; DWORD max_value_len = 256, value_len; @@ -246,7 +246,7 @@ static int export_registry_data(HANDLE hFile, HKEY key, WCHAR *path) { value_len = max_value_len; data_size = max_data_bytes; - rc = RegEnumValueW(key, i, value_name, &value_len, NULL, &type, data, &data_size); + rc = RegEnumValueW(hkey, i, value_name, &value_len, NULL, &type, data, &data_size); if (rc == ERROR_SUCCESS) { @@ -280,11 +280,11 @@ static int export_registry_data(HANDLE hFile, HKEY key, WCHAR *path) for (;;) { subkey_len = MAX_SUBKEY_LEN; - rc = RegEnumKeyExW(key, i, subkey_name, &subkey_len, NULL, NULL, NULL, NULL); + rc = RegEnumKeyExW(hkey, i, subkey_name, &subkey_len, NULL, NULL, NULL, NULL); if (rc == ERROR_SUCCESS) { subkey_path = build_subkey_path(path, path_len, subkey_name, subkey_len); - if (!RegOpenKeyExW(key, subkey_name, 0, KEY_READ, &subkey)) + if (!RegOpenKeyExW(hkey, subkey_name, 0, KEY_READ, &subkey)) { export_registry_data(hFile, subkey, subkey_path); RegCloseKey(subkey); diff --git a/base/applications/cmdutils/reg/query.c b/base/applications/cmdutils/reg/query.c index 9d840c8947d..6485d36db6f 100644 --- a/base/applications/cmdutils/reg/query.c +++ b/base/applications/cmdutils/reg/query.c @@ -133,7 +133,7 @@ static void output_value(const WCHAR *value_name, DWORD type, BYTE *data, DWORD static unsigned int num_values_found = 0; -static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) +static int query_value(HKEY hkey, WCHAR *value_name, WCHAR *path, BOOL recurse) { LONG rc; DWORD max_data_bytes = 2048, data_size; @@ -149,7 +149,7 @@ static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) for (;;) { data_size = max_data_bytes; - rc = RegQueryValueExW(key, value_name, NULL, &type, data, &data_size); + rc = RegQueryValueExW(hkey, value_name, NULL, &type, data, &data_size); if (rc == ERROR_MORE_DATA) { max_data_bytes = data_size; @@ -191,11 +191,11 @@ static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) for (;;) { subkey_len = MAX_SUBKEY_LEN; - rc = RegEnumKeyExW(key, i, subkey_name, &subkey_len, NULL, NULL, NULL, NULL); + rc = RegEnumKeyExW(hkey, i, subkey_name, &subkey_len, NULL, NULL, NULL, NULL); if (rc == ERROR_SUCCESS) { subkey_path = build_subkey_path(path, path_len, subkey_name, subkey_len); - if (!RegOpenKeyExW(key, subkey_name, 0, KEY_READ, &subkey)) + if (!RegOpenKeyExW(hkey, subkey_name, 0, KEY_READ, &subkey)) { query_value(subkey, value_name, subkey_path, recurse); RegCloseKey(subkey); @@ -210,7 +210,7 @@ static int query_value(HKEY key, WCHAR *value_name, WCHAR *path, BOOL recurse) return 0; } -static int query_all(HKEY key, WCHAR *path, BOOL recurse) +static int query_all(HKEY hkey, WCHAR *path, BOOL recurse) { LONG rc; DWORD max_value_len = 256, value_len; @@ -231,7 +231,7 @@ static int query_all(HKEY key, WCHAR *path, BOOL recurse) { value_len = max_value_len; data_size = max_data_bytes; - rc = RegEnumValueW(key, i, value_name, &value_len, NULL, &type, data, &data_size); + rc = RegEnumValueW(hkey, i, value_name, &value_len, NULL, &type, data, &data_size); if (rc == ERROR_SUCCESS) { output_value(value_name, type, data, data_size); @@ -267,13 +267,13 @@ static int query_all(HKEY key, WCHAR *path, BOOL recurse) for (;;) { subkey_len = MAX_SUBKEY_LEN; - rc = RegEnumKeyExW(key, i, subkey_name, &subkey_len, NULL, NULL, NULL, NULL); + rc = RegEnumKeyExW(hkey, i, subkey_name, &subkey_len, NULL, NULL, NULL, NULL); if (rc == ERROR_SUCCESS) { if (recurse) { subkey_path = build_subkey_path(path, path_len, subkey_name, subkey_len); - if (!RegOpenKeyExW(key, subkey_name, 0, KEY_READ, &subkey)) + if (!RegOpenKeyExW(hkey, subkey_name, 0, KEY_READ, &subkey)) { query_all(subkey, subkey_path, recurse); RegCloseKey(subkey); @@ -297,10 +297,10 @@ static int query_all(HKEY key, WCHAR *path, BOOL recurse) static int run_query(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name, BOOL value_empty, BOOL recurse) { - HKEY key; + HKEY hkey; int ret; - if (RegOpenKeyExW(root, path, 0, KEY_READ, &key) != ERROR_SUCCESS) + if (RegOpenKeyExW(root, path, 0, KEY_READ, &hkey) != ERROR_SUCCESS) { output_message(STRING_KEY_NONEXIST); return 1; @@ -310,14 +310,14 @@ static int run_query(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name, if (value_name || value_empty) { - ret = query_value(key, value_name, key_name, recurse); + ret = query_value(hkey, value_name, key_name, recurse); if (recurse) output_message(STRING_MATCHES_FOUND, num_values_found); } else - ret = query_all(key, key_name, recurse); + ret = query_all(hkey, key_name, recurse); - RegCloseKey(key); + RegCloseKey(hkey); return ret; } diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index ee2ece72dec..49aa0a28361 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: e685718c3b701b67e1920a8e4f2ddce31d3ca800 + wine: c809f9462455ffb0e03a9ae4057f0cd47c85ee5d
2 years, 6 months
1
0
0
0
[reactos] 84/158: [WINESYNC] reg: Print the full key path without a trailing backslash.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a0060cdcee5b900fffc97…
commit a0060cdcee5b900fffc9776a53dcea347b516224 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:10:12 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:33 2022 +0200 [WINESYNC] reg: Print the full key path without a trailing backslash. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id e685718c3b701b67e1920a8e4f2ddce31d3ca800 by Hugh McMaster <hugh.mcmaster(a)outlook.com> manual adjustment needed --- base/applications/cmdutils/reg/reg.c | 14 +++++++++++--- modules/rostests/winetests/reg/query.c | 2 +- sdk/tools/winesync/reg.cfg | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/base/applications/cmdutils/reg/reg.c b/base/applications/cmdutils/reg/reg.c index d77654c81fe..0938bffe53e 100644 --- a/base/applications/cmdutils/reg/reg.c +++ b/base/applications/cmdutils/reg/reg.c @@ -205,10 +205,10 @@ WCHAR *build_subkey_path(WCHAR *path, DWORD path_len, WCHAR *subkey_name, DWORD WCHAR *get_long_key(HKEY root, WCHAR *path) { - DWORD i, array_size = ARRAY_SIZE(root_rels), len; + int i, len, path_len; WCHAR *long_key; - for (i = 0; i < array_size; i++) + for (i = 0; i < ARRAY_SIZE(root_rels); i++) { if (root == root_rels[i].key) break; @@ -223,7 +223,15 @@ WCHAR *get_long_key(HKEY root, WCHAR *path) return long_key; } - len += lstrlenW(path) + 1; /* add one for the backslash */ + path_len = lstrlenW(path); + + if (path[path_len - 1] == '\\') + { + path[path_len - 1] = 0; + path_len--; + } + + len += path_len + 1; /* add one for the concatenating backslash */ long_key = malloc((len + 1) * sizeof(WCHAR)); swprintf(long_key, L"%s\\%s", root_rels[i].long_name, path); return long_key; diff --git a/modules/rostests/winetests/reg/query.c b/modules/rostests/winetests/reg/query.c index 5c97554648e..34196c77aa4 100644 --- a/modules/rostests/winetests/reg/query.c +++ b/modules/rostests/winetests/reg/query.c @@ -251,7 +251,7 @@ static void test_query(void) read_reg_output("reg query HKCU\\" KEY_BASE "\\ /s", buf, sizeof(buf), &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - compare_query(buf, test6, FALSE, TODO_REG_COMPARE); + compare_query(buf, test6, FALSE, 0); read_reg_output("reg query HKCU\\" KEY_BASE " /v Wine /s", buf, sizeof(buf), &r); ok(r == REG_EXIT_SUCCESS || r == REG_EXIT_FAILURE /* WinXP */, diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 81008da16da..ee2ece72dec 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 797520db8f7eb708845891da6f08d3030393d6bc + wine: e685718c3b701b67e1920a8e4f2ddce31d3ca800
2 years, 6 months
1
0
0
0
[reactos] 83/158: [WINESYNC] reg: Fail if a system key has a trailing backslash but no subkey path.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f42b63fd6445bdef03496…
commit f42b63fd6445bdef034965873762dde158cfa9b9 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:10:12 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:33 2022 +0200 [WINESYNC] reg: Fail if a system key has a trailing backslash but no subkey path. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 797520db8f7eb708845891da6f08d3030393d6bc by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- base/applications/cmdutils/reg/reg.c | 16 +++++++++++++--- modules/rostests/winetests/reg/add.c | 8 ++++---- sdk/tools/winesync/reg.cfg | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/base/applications/cmdutils/reg/reg.c b/base/applications/cmdutils/reg/reg.c index c66daeb32b0..d77654c81fe 100644 --- a/base/applications/cmdutils/reg/reg.c +++ b/base/applications/cmdutils/reg/reg.c @@ -234,9 +234,6 @@ BOOL parse_registry_key(const WCHAR *key, HKEY *root, WCHAR **path) if (!sane_path(key)) return FALSE; - *path = wcschr(key, '\\'); - if (*path) (*path)++; - *root = path_get_rootkey(key); if (!*root) { @@ -244,6 +241,19 @@ BOOL parse_registry_key(const WCHAR *key, HKEY *root, WCHAR **path) return FALSE; } + *path = wcschr(key, '\\'); + + if (!*path) + return TRUE; + + (*path)++; + + if (!**path) + { + output_message(STRING_INVALID_SYSTEM_KEY); + return FALSE; + } + return TRUE; } diff --git a/modules/rostests/winetests/reg/add.c b/modules/rostests/winetests/reg/add.c index 36b5f821350..6973eefd892 100644 --- a/modules/rostests/winetests/reg/add.c +++ b/modules/rostests/winetests/reg/add.c @@ -311,12 +311,12 @@ static void test_key_formats(void) /* Test validity of trailing backslash after system key */ run_reg_exe("reg add HKCU\\ /v Value1 /t REG_SZ /d foo /f", &r); - todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - todo_wine verify_reg_nonexist(HKEY_CURRENT_USER, "Value1"); + ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + verify_reg_nonexist(HKEY_CURRENT_USER, "Value1"); run_reg_exe("reg add HKEY_CURRENT_USER\\ /v Value2 /t REG_SZ /d bar /f", &r); - todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - todo_wine verify_reg_nonexist(HKEY_CURRENT_USER, "Value2"); + ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + verify_reg_nonexist(HKEY_CURRENT_USER, "Value2"); } static void test_add(void) diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 595566ef15f..81008da16da 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 6d2ab37a44c6d0bd58504cbc3ff20d2828afc841 + wine: 797520db8f7eb708845891da6f08d3030393d6bc
2 years, 6 months
1
0
0
0
[reactos] 82/158: [WINESYNC] reg: Drop key output from the "Invalid system key" error message.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f55096783de379948010b…
commit f55096783de379948010b689ae2a4431ddd4b183 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:08:23 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:33 2022 +0200 [WINESYNC] reg: Drop key output from the "Invalid system key" error message. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 6d2ab37a44c6d0bd58504cbc3ff20d2828afc841 by Hugh McMaster <hugh.mcmaster(a)outlook.com> manual adjustment needed --- base/applications/cmdutils/reg/lang/en-US.rc | 2 +- base/applications/cmdutils/reg/reg.c | 3 +-- sdk/tools/winesync/reg.cfg | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/base/applications/cmdutils/reg/lang/en-US.rc b/base/applications/cmdutils/reg/lang/en-US.rc index 97064f2522b..97b55e6eda1 100644 --- a/base/applications/cmdutils/reg/lang/en-US.rc +++ b/base/applications/cmdutils/reg/lang/en-US.rc @@ -144,7 +144,7 @@ STRINGTABLE \ /y\n\ \ Overwrite <file> without prompting for confirmation.\n\n" - STRING_INVALID_SYSTEM_KEY, "reg: Invalid system key [%1]\n" + STRING_INVALID_SYSTEM_KEY, "reg: Invalid system key\n" STRING_OVERWRITE_FILE, "The file '%1' already exists. Do you want to overwrite it?" STRING_KEY_NONEXIST, "reg: Unable to find the specified registry key\n" STRING_KEY_IMPORT_FAILED, "reg: Unable to import the registry key '%1'\n" diff --git a/base/applications/cmdutils/reg/reg.c b/base/applications/cmdutils/reg/reg.c index 2303df81823..c66daeb32b0 100644 --- a/base/applications/cmdutils/reg/reg.c +++ b/base/applications/cmdutils/reg/reg.c @@ -240,8 +240,7 @@ BOOL parse_registry_key(const WCHAR *key, HKEY *root, WCHAR **path) *root = path_get_rootkey(key); if (!*root) { - if (*path) *(*path - 1) = 0; - output_message(STRING_INVALID_SYSTEM_KEY, key); + output_message(STRING_INVALID_SYSTEM_KEY); return FALSE; } diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 5e3749d9529..595566ef15f 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 8b0602023add5c530e4f257ebf07ebae8e4ffdba + wine: 6d2ab37a44c6d0bd58504cbc3ff20d2828afc841
2 years, 6 months
1
0
0
0
[reactos] 81/158: [WINESYNC] reg/tests: Add tests for querying a key only containing subkeys.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4771673c8fc3d4a34c8f2…
commit 4771673c8fc3d4a34c8f228e730911e68caa5e1b Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:08:23 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:33 2022 +0200 [WINESYNC] reg/tests: Add tests for querying a key only containing subkeys. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 8b0602023add5c530e4f257ebf07ebae8e4ffdba by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/query.c | 30 ++++++++++++++++++++++++++++++ sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/reg/query.c b/modules/rostests/winetests/reg/query.c index 7c8a1795b34..5c97554648e 100644 --- a/modules/rostests/winetests/reg/query.c +++ b/modules/rostests/winetests/reg/query.c @@ -148,6 +148,18 @@ static void test_query(void) "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey\r\n" " Wine REG_SZ Second instance\r\n\r\n"; + const char *test8a = "\r\n" + "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey1\r\n" + "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey2\r\n" + "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey3\r\n" + "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey4\r\n"; + + const char *test8b = "\r\n" + "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey1\r\n\r\n" + "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey2\r\n\r\n" + "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey3\r\n\r\n" + "HKEY_CURRENT_USER\\" KEY_BASE "\\subkey4\r\n\r\n"; + DWORD r, dword = 0x123; HKEY hkey, subkey; BYTE buf[512]; @@ -259,6 +271,24 @@ static void test_query(void) "got exit code %d, expected 0\n", r); delete_tree(HKEY_CURRENT_USER, KEY_BASE); + + /* Subkeys only */ + add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey); + add_key(hkey, "subkey1", NULL); + add_key(hkey, "subkey2", NULL); + add_key(hkey, "subkey3", NULL); + add_key(hkey, "subkey4", NULL); + close_key(hkey); + + read_reg_output("reg query HKCU\\" KEY_BASE, buf, sizeof(buf), &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + compare_query(buf, test8a, FALSE, TODO_REG_COMPARE); + + read_reg_output("reg query HKCU\\" KEY_BASE " /s", buf, sizeof(buf), &r); + ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + compare_query(buf, test8b, FALSE, TODO_REG_COMPARE); + + delete_tree(HKEY_CURRENT_USER, KEY_BASE); } START_TEST(query) diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index e6222899264..5e3749d9529 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: c573fce35b80d60b38b720a82fee53941c7490ea + wine: 8b0602023add5c530e4f257ebf07ebae8e4ffdba
2 years, 6 months
1
0
0
0
[reactos] 80/158: [WINESYNC] reg/tests: Use 'hkey' in 'query' tests for consistency with other reg.exe tests.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d552b44ff845aabfaac5b…
commit d552b44ff845aabfaac5b13951818148e4262c0b Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:08:23 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:33 2022 +0200 [WINESYNC] reg/tests: Use 'hkey' in 'query' tests for consistency with other reg.exe tests. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id c573fce35b80d60b38b720a82fee53941c7490ea by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/query.c | 16 ++++++++-------- sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/rostests/winetests/reg/query.c b/modules/rostests/winetests/reg/query.c index 3c87f76742e..7c8a1795b34 100644 --- a/modules/rostests/winetests/reg/query.c +++ b/modules/rostests/winetests/reg/query.c @@ -149,7 +149,7 @@ static void test_query(void) " Wine REG_SZ Second instance\r\n\r\n"; DWORD r, dword = 0x123; - HKEY key, subkey; + HKEY hkey, subkey; BYTE buf[512]; delete_tree(HKEY_CURRENT_USER, KEY_BASE); @@ -172,9 +172,9 @@ static void test_query(void) ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); /* Create a test key */ - add_key(HKEY_CURRENT_USER, KEY_BASE, &key); - add_value(key, "Test1", REG_SZ, "Hello, World", 13); - add_value(key, "Test2", REG_DWORD, &dword, sizeof(dword)); + add_key(HKEY_CURRENT_USER, KEY_BASE, &hkey); + add_value(hkey, "Test1", REG_SZ, "Hello, World", 13); + add_value(hkey, "Test2", REG_DWORD, &dword, sizeof(dword)); run_reg_exe("reg query HKCU\\" KEY_BASE " /v", &r); ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); @@ -206,10 +206,10 @@ static void test_query(void) run_reg_exe("reg query HKCU\\" KEY_BASE " /v Test2", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); - add_value(key, "Wine", REG_SZ, "First instance", 15); + add_value(hkey, "Wine", REG_SZ, "First instance", 15); /* Create a test subkey */ - add_key(key, "subkey", &subkey); + add_key(hkey, "subkey", &subkey); read_reg_output("reg query HKCU\\" KEY_BASE, buf, sizeof(buf), &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); @@ -246,10 +246,10 @@ static void test_query(void) "got exit code %d, expected 0\n", r); compare_query(buf, test7, TRUE, 0); - add_value(key, NULL, REG_SZ, "Empty", 6); + add_value(hkey, NULL, REG_SZ, "Empty", 6); add_value(subkey, NULL, REG_SZ, "Empty", 6); close_key(subkey); - close_key(key); + close_key(hkey); run_reg_exe("reg query HKCU\\" KEY_BASE "\\subkey /ve", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 064c1fd6178..e6222899264 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: 9752dfeea82c48e2230bacbf9db9564d5562de02 + wine: c573fce35b80d60b38b720a82fee53941c7490ea
2 years, 6 months
1
0
0
0
[reactos] 79/158: [WINESYNC] reg/tests: Only try querying an invalid key once.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2535ff3f1bccd7a2d5e01…
commit 2535ff3f1bccd7a2d5e01c4082fc8a07ee58f52c Author: winesync <ros-dev(a)reactos.org> AuthorDate: Sun Jan 16 21:08:23 2022 +0100 Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com> CommitDate: Sun Jun 19 13:06:33 2022 +0200 [WINESYNC] reg/tests: Only try querying an invalid key once. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 9752dfeea82c48e2230bacbf9db9564d5562de02 by Hugh McMaster <hugh.mcmaster(a)outlook.com> --- modules/rostests/winetests/reg/query.c | 17 ++++++----------- sdk/tools/winesync/reg.cfg | 2 +- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/modules/rostests/winetests/reg/query.c b/modules/rostests/winetests/reg/query.c index c475d288fd8..3c87f76742e 100644 --- a/modules/rostests/winetests/reg/query.c +++ b/modules/rostests/winetests/reg/query.c @@ -167,6 +167,10 @@ static void test_query(void) run_reg_exe("reg query -H", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); + /* Key not present */ + run_reg_exe("reg query HKCU\\" KEY_BASE, &r); + ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + /* Create a test key */ add_key(HKEY_CURRENT_USER, KEY_BASE, &key); add_value(key, "Test1", REG_SZ, "Hello, World", 13); @@ -245,6 +249,7 @@ static void test_query(void) add_value(key, NULL, REG_SZ, "Empty", 6); add_value(subkey, NULL, REG_SZ, "Empty", 6); close_key(subkey); + close_key(key); run_reg_exe("reg query HKCU\\" KEY_BASE "\\subkey /ve", &r); ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r); @@ -253,17 +258,7 @@ static void test_query(void) ok(r == REG_EXIT_SUCCESS || r == REG_EXIT_FAILURE /* WinXP */, "got exit code %d, expected 0\n", r); - /* Clean-up, then query */ - delete_key(key, "subkey"); - close_key(key); - - run_reg_exe("reg query HKCU\\" KEY_BASE "\\subkey", &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); - - delete_key(HKEY_CURRENT_USER, KEY_BASE); - - run_reg_exe("reg query HKCU\\" KEY_BASE, &r); - ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r); + delete_tree(HKEY_CURRENT_USER, KEY_BASE); } START_TEST(query) diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg index 0ce4b38b11f..064c1fd6178 100644 --- a/sdk/tools/winesync/reg.cfg +++ b/sdk/tools/winesync/reg.cfg @@ -4,4 +4,4 @@ directories: files: programs/reg/resource.h: base/applications/cmdutils/reg/resource.h tags: - wine: e9412a8ae020fe614d96d20f20355d53593048cc + wine: 9752dfeea82c48e2230bacbf9db9564d5562de02
2 years, 6 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
24
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Results per page:
10
25
50
100
200