kernel32/tests: Add test for FormatMessage with HRESULT.
This commit is contained in:
parent
d74c9e3ec2
commit
af59823567
|
@ -1552,6 +1552,12 @@ static void test_message_from_hmodule(void)
|
|||
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL);
|
||||
ok(ret != 0, "FormatMessageA returned 0\n");
|
||||
|
||||
/* Test HRESULT. It's not documented but in practice _com_error::ErrorMessage relies on this. */
|
||||
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 0x80070005 /* E_ACCESSDENIED */,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL);
|
||||
todo_wine
|
||||
ok(ret != 0, "FormatMessageA returned 0\n");
|
||||
|
||||
/* Test a message string with an insertion without passing any variadic arguments. */
|
||||
ret = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_FROM_HMODULE, h, 193 /* ERROR_BAD_EXE_FORMAT */,
|
||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), out, sizeof(out)/sizeof(CHAR), NULL);
|
||||
|
|
Loading…
Reference in New Issue