[WINESYNC] reg: Add a message to better indicate when a specified registry key is not found.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id fa2ed01352f8f027625d464915cd953e10766d73 by Hugh McMaster <hugh.mcmaster@outlook.com>

manual adjustment needed
This commit is contained in:
winesync 2022-01-16 20:59:23 +01:00 committed by Thomas Csovcsity
parent 9b424b0080
commit e11511da86
6 changed files with 7 additions and 5 deletions

View file

@ -46,7 +46,7 @@ static int run_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name
{ {
if (RegDeleteTreeW(root, path) != ERROR_SUCCESS) if (RegDeleteTreeW(root, path) != ERROR_SUCCESS)
{ {
output_message(STRING_CANNOT_FIND); output_message(STRING_KEY_NONEXIST);
return 1; return 1;
} }
output_message(STRING_SUCCESS); output_message(STRING_SUCCESS);
@ -55,7 +55,7 @@ static int run_delete(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name
if (RegOpenKeyExW(root, path, 0, KEY_READ|KEY_SET_VALUE, &key)) if (RegOpenKeyExW(root, path, 0, KEY_READ|KEY_SET_VALUE, &key))
{ {
output_message(STRING_CANNOT_FIND); output_message(STRING_KEY_NONEXIST);
return 1; return 1;
} }

View file

@ -374,7 +374,7 @@ int reg_export(int argc, WCHAR *argvW[])
if (RegOpenKeyExW(root, path, 0, KEY_READ, &hkey)) if (RegOpenKeyExW(root, path, 0, KEY_READ, &hkey))
{ {
output_message(STRING_INVALID_KEY); output_message(STRING_KEY_NONEXIST);
return 1; return 1;
} }

View file

@ -146,4 +146,5 @@ STRINGTABLE
STRING_INVALID_SYSTEM_KEY, "reg: Invalid system key [%1]\n" STRING_INVALID_SYSTEM_KEY, "reg: Invalid system key [%1]\n"
STRING_OVERWRITE_FILE, "The file '%1' already exists. Do you want to overwrite it?" 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"
} }

View file

@ -302,7 +302,7 @@ static int run_query(HKEY root, WCHAR *path, WCHAR *key_name, WCHAR *value_name,
if (RegOpenKeyExW(root, path, 0, KEY_READ, &key) != ERROR_SUCCESS) if (RegOpenKeyExW(root, path, 0, KEY_READ, &key) != ERROR_SUCCESS)
{ {
output_message(STRING_CANNOT_FIND); output_message(STRING_KEY_NONEXIST);
return 1; return 1;
} }

View file

@ -61,3 +61,4 @@
#define STRING_EXPORT_USAGE 136 #define STRING_EXPORT_USAGE 136
#define STRING_INVALID_SYSTEM_KEY 137 #define STRING_INVALID_SYSTEM_KEY 137
#define STRING_OVERWRITE_FILE 138 #define STRING_OVERWRITE_FILE 138
#define STRING_KEY_NONEXIST 139

View file

@ -4,4 +4,4 @@ directories:
files: files:
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
tags: tags:
wine: 4df5c1641e7091f42c2313b275d999f2b9d25eff wine: fa2ed01352f8f027625d464915cd953e10766d73