Signed-off-by: Paul Gofman pgofman@codeweavers.com --- tools/wmc/mcl.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/tools/wmc/mcl.c b/tools/wmc/mcl.c index 579d4b87882..93e666fed74 100644 --- a/tools/wmc/mcl.c +++ b/tools/wmc/mcl.c @@ -85,6 +85,7 @@ static const WCHAR ustr_language[] = { 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 0 static const WCHAR ustr_languagenames[] = { 'L', 'a', 'n', 'g', 'u', 'a', 'g', 'e', 'N', 'a', 'm', 'e', 's', 0}; static const WCHAR ustr_messageid[] = { 'M', 'e', 's', 's', 'a', 'g', 'e', 'I', 'd', 0 }; static const WCHAR ustr_messageidtypedef[] = { 'M', 'e', 's', 's', 'a', 'g', 'e', 'I', 'd', 'T', 'y', 'p', 'e', 'd', 'e', 'f', 0 }; +static const WCHAR ustr_dxgi[] = { 'D', 'x', 'g', 'i', 0 }; static const WCHAR ustr_null[] = { 'N', 'u', 'l', 'l', 0 }; static const WCHAR ustr_outputbase[] = { 'O', 'u', 't', 'p', 'u', 't', 'B', 'a', 's', 'e', 0 }; static const WCHAR ustr_severity[] = { 'S', 'e', 'v', 'e', 'r', 'i', 't', 'y', 0 }; @@ -552,6 +553,7 @@ int mcy_lex(void) add_token(tok_severity, ustr_success, 0x00, 0, NULL, 0); add_token(tok_facility, ustr_application, 0xFFF, 0, NULL, 0); add_token(tok_facility, ustr_system, 0x0FF, 0, NULL, 0); + add_token(tok_facility, ustr_dxgi, 0x87a, 0, NULL, 0); add_token(tok_facility, ustr_null, 0x000, 0, NULL, 0); add_token(tok_language, ustr_english, 0x409, 437, ustr_msg00001, 0); }
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/kernel32/tests/format_msg.c | 16 +++++++++++----- dlls/kernel32/winerror.mc | 7 +++++++ 2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/dlls/kernel32/tests/format_msg.c b/dlls/kernel32/tests/format_msg.c index a0b1e4eef03..143530a74ac 100644 --- a/dlls/kernel32/tests/format_msg.c +++ b/dlls/kernel32/tests/format_msg.c @@ -1745,20 +1745,26 @@ static void test_message_from_64bit_number(void)
static void test_message_system_errors(void) { - static const DWORD error_codes[] = + static const struct + { + DWORD error_code; + BOOL broken; + } + tests[] = { - E_NOTIMPL, + {E_NOTIMPL}, + {DXGI_ERROR_INVALID_CALL, TRUE /* Available since Win8 */}, };
char buffer[256]; unsigned int i; DWORD len;
- for (i = 0; i < ARRAY_SIZE(error_codes); ++i) + for (i = 0; i < ARRAY_SIZE(tests); ++i) { - len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, error_codes[i], + len = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, tests[i].error_code, LANG_USER_DEFAULT, buffer, ARRAY_SIZE(buffer), NULL); - ok(len, "Got zero len, code %#x.\n", error_codes[i]); + ok(len || broken(tests[i].broken), "Got zero len, code %#x.\n", tests[i].error_code); } }
diff --git a/dlls/kernel32/winerror.mc b/dlls/kernel32/winerror.mc index 3d01db9541f..b777389571c 100644 --- a/dlls/kernel32/winerror.mc +++ b/dlls/kernel32/winerror.mc @@ -3764,3 +3764,10 @@ SymbolicName=E_NOTIMPL Language=ENU Not implemented. . +MessageId=0x1 +Severity=CoError +Facility=Dxgi +SymbolicName=DXGI_ERROR_INVALID_CALL +Language=ENU +Invalid call. +.
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=79018
Your paranoid android.
=== debiant (32 bit report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b8968 / 1b8338
=== debiant (32 bit Chinese:China report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b8968 / 1b8338
=== debiant (32 bit WoW report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b8968 / 1b8338
=== debiant (64 bit WoW report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b8968 / 1b8338
Fixes a crash in Horizon Zero Dawn on switching to fullscreen mode.
Signed-off-by: Paul Gofman pgofman@codeweavers.com --- dlls/kernel32/tests/format_msg.c | 1 + dlls/kernel32/winerror.mc | 7 +++++++ 2 files changed, 8 insertions(+)
diff --git a/dlls/kernel32/tests/format_msg.c b/dlls/kernel32/tests/format_msg.c index 143530a74ac..52b7b6925e4 100644 --- a/dlls/kernel32/tests/format_msg.c +++ b/dlls/kernel32/tests/format_msg.c @@ -1754,6 +1754,7 @@ static void test_message_system_errors(void) { {E_NOTIMPL}, {DXGI_ERROR_INVALID_CALL, TRUE /* Available since Win8 */}, + {DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, TRUE /* Available since Win8 */}, };
char buffer[256]; diff --git a/dlls/kernel32/winerror.mc b/dlls/kernel32/winerror.mc index b777389571c..341c9572710 100644 --- a/dlls/kernel32/winerror.mc +++ b/dlls/kernel32/winerror.mc @@ -3771,3 +3771,10 @@ SymbolicName=DXGI_ERROR_INVALID_CALL Language=ENU Invalid call. . +MessageId=0x22 +Severity=CoError +Facility=Dxgi +SymbolicName=DXGI_ERROR_NOT_CURRENTLY_AVAILABLE +Language=ENU +Resource is not currently available. +.
I have verified with the attached test program that the strings really can be queried from kernel32.dll:
res_str.exe kernel32.dll 887a0001
res_str.exe kernel32.dll 887a0022
On 9/21/20 14:20, Paul Gofman wrote:
Fixes a crash in Horizon Zero Dawn on switching to fullscreen mode.
Signed-off-by: Paul Gofman pgofman@codeweavers.com
dlls/kernel32/tests/format_msg.c | 1 + dlls/kernel32/winerror.mc | 7 +++++++ 2 files changed, 8 insertions(+)
diff --git a/dlls/kernel32/tests/format_msg.c b/dlls/kernel32/tests/format_msg.c index 143530a74ac..52b7b6925e4 100644 --- a/dlls/kernel32/tests/format_msg.c +++ b/dlls/kernel32/tests/format_msg.c @@ -1754,6 +1754,7 @@ static void test_message_system_errors(void) { {E_NOTIMPL}, {DXGI_ERROR_INVALID_CALL, TRUE /* Available since Win8 */},
{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE, TRUE /* Available since Win8 */}, }; char buffer[256];
diff --git a/dlls/kernel32/winerror.mc b/dlls/kernel32/winerror.mc index b777389571c..341c9572710 100644 --- a/dlls/kernel32/winerror.mc +++ b/dlls/kernel32/winerror.mc @@ -3771,3 +3771,10 @@ SymbolicName=DXGI_ERROR_INVALID_CALL Language=ENU Invalid call. . +MessageId=0x22 +Severity=CoError +Facility=Dxgi +SymbolicName=DXGI_ERROR_NOT_CURRENTLY_AVAILABLE +Language=ENU +Resource is not currently available. +.
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=79019
Your paranoid android.
=== debiant (32 bit report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b9544 / 1b8338
=== debiant (32 bit Chinese:China report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b9544 / 1b8338
=== debiant (32 bit WoW report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b9544 / 1b8338
=== debiant (64 bit WoW report) ===
kernel32: loader.c:3946: Test failed: kernel32.dll:2: wrong OptionalHeader.DataDirectory[i].Size 1b9544 / 1b8338