mirror of
https://github.com/reactos/wine.git
synced 2024-11-27 21:50:37 +00:00
server: Fix the status code for get/set_thread_context on a terminated thread.
This commit is contained in:
parent
5dc9c73c31
commit
055c883ee0
@ -955,6 +955,22 @@ static void test_SetThreadContext(void)
|
||||
|
||||
WaitForSingleObject( thread, INFINITE );
|
||||
ok( test_value == 20, "test_value %d instead of 20\n", test_value );
|
||||
|
||||
ctx.ContextFlags = CONTEXT_FULL;
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = GetThreadContext( thread, &ctx );
|
||||
ok( !ret, "GetThreadContext succeeded\n" );
|
||||
ok( GetLastError() == ERROR_GEN_FAILURE || broken(GetLastError() == ERROR_INVALID_HANDLE), /* win2k */
|
||||
"wrong error %u\n", GetLastError() );
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ret = SetThreadContext( thread, &ctx );
|
||||
ok( !ret, "SetThreadContext succeeded\n" );
|
||||
ok( GetLastError() == ERROR_GEN_FAILURE || GetLastError() == ERROR_ACCESS_DENIED ||
|
||||
broken(GetLastError() == ERROR_INVALID_HANDLE), /* win2k */
|
||||
"wrong error %u\n", GetLastError() );
|
||||
|
||||
CloseHandle( thread );
|
||||
}
|
||||
|
||||
#endif /* __i386__ */
|
||||
|
@ -1493,7 +1493,7 @@ DECL_HANDLER(get_thread_context)
|
||||
suspend_thread( thread );
|
||||
}
|
||||
}
|
||||
else set_error( STATUS_ACCESS_DENIED );
|
||||
else set_error( STATUS_UNSUCCESSFUL );
|
||||
}
|
||||
else if ((context = set_reply_data_size( sizeof(context_t) )))
|
||||
{
|
||||
@ -1535,7 +1535,7 @@ DECL_HANDLER(set_thread_context)
|
||||
suspend_thread( thread );
|
||||
}
|
||||
}
|
||||
else set_error( STATUS_ACCESS_DENIED );
|
||||
else set_error( STATUS_UNSUCCESSFUL );
|
||||
}
|
||||
else if (context->cpu == thread->process->cpu)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user