Commit 050dc49b authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

server: Set error to STATUS_UNSUCCESSFUL when the server fails to queue APC for a thread.

I've left another case of returning STATUS_PROCESS_IS_TERMINATING since that's not covered by the tests. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50704Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 816b588e
......@@ -2737,13 +2737,11 @@ static void test_QueueUserAPC(void)
ok(ret == WAIT_OBJECT_0, "got %u\n", ret);
ret = pNtQueueApcThread(thread, call_user_apc, (ULONG_PTR)user_apc, 0, 0);
todo_wine
ok(ret == STATUS_UNSUCCESSFUL, "got %#x\n", ret);
SetLastError(0xdeadbeef);
ret = QueueUserAPC(user_apc, thread, 0);
ok(!ret, "QueueUserAPC should fail\n");
todo_wine
ok(GetLastError() == ERROR_GEN_FAILURE, "got %u\n", GetLastError());
CloseHandle(thread);
......
......@@ -1763,7 +1763,7 @@ DECL_HANDLER(queue_apc)
if (thread)
{
if (!queue_apc( NULL, thread, apc )) set_error( STATUS_THREAD_IS_TERMINATING );
if (!queue_apc( NULL, thread, apc )) set_error( STATUS_UNSUCCESSFUL );
release_object( thread );
}
else if (process)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment