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. +.