server: Use the same field for process and thread handle in the queue_apc request.

This commit is contained in:
Alexandre Julliard 2008-12-26 12:19:41 +01:00
parent a7b3efde0e
commit b660aaa9ea
6 changed files with 11 additions and 14 deletions

View File

@ -1032,7 +1032,7 @@ NTSTATUS NTDLL_queue_process_apc( HANDLE process, const apc_call_t *call, apc_re
SERVER_START_REQ( queue_apc )
{
req->process = wine_server_obj_handle( process );
req->handle = wine_server_obj_handle( process );
req->call = *call;
if (!(ret = wine_server_call( req )))
{

View File

@ -747,7 +747,7 @@ NTSTATUS WINAPI NtQueueApcThread( HANDLE handle, PNTAPCFUNC func, ULONG_PTR arg1
NTSTATUS ret;
SERVER_START_REQ( queue_apc )
{
req->thread = wine_server_obj_handle( handle );
req->handle = wine_server_obj_handle( handle );
if (func)
{
req->call.type = APC_USER;

View File

@ -749,8 +749,7 @@ struct unload_dll_reply
struct queue_apc_request
{
struct request_header __header;
obj_handle_t thread;
obj_handle_t process;
obj_handle_t handle;
apc_call_t call;
};
struct queue_apc_reply
@ -5051,6 +5050,6 @@ union generic_reply
struct set_window_layered_info_reply set_window_layered_info_reply;
};
#define SERVER_PROTOCOL_VERSION 354
#define SERVER_PROTOCOL_VERSION 355
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */

View File

@ -673,8 +673,7 @@ typedef union
/* Queue an APC for a thread or process */
@REQ(queue_apc)
obj_handle_t thread; /* thread handle */
obj_handle_t process; /* process handle */
obj_handle_t handle; /* thread or process handle */
apc_call_t call; /* call arguments */
@REPLY
obj_handle_t handle; /* APC handle */

View File

@ -1242,7 +1242,7 @@ DECL_HANDLER(queue_apc)
{
case APC_NONE:
case APC_USER:
thread = get_thread_from_handle( req->thread, THREAD_SET_CONTEXT );
thread = get_thread_from_handle( req->handle, THREAD_SET_CONTEXT );
break;
case APC_VIRTUAL_ALLOC:
case APC_VIRTUAL_FREE:
@ -1251,13 +1251,13 @@ DECL_HANDLER(queue_apc)
case APC_VIRTUAL_LOCK:
case APC_VIRTUAL_UNLOCK:
case APC_UNMAP_VIEW:
process = get_process_from_handle( req->process, PROCESS_VM_OPERATION );
process = get_process_from_handle( req->handle, PROCESS_VM_OPERATION );
break;
case APC_VIRTUAL_QUERY:
process = get_process_from_handle( req->process, PROCESS_QUERY_INFORMATION );
process = get_process_from_handle( req->handle, PROCESS_QUERY_INFORMATION );
break;
case APC_MAP_VIEW:
process = get_process_from_handle( req->process, PROCESS_VM_OPERATION );
process = get_process_from_handle( req->handle, PROCESS_VM_OPERATION );
if (process && process != current->process)
{
/* duplicate the handle into the target process */
@ -1272,7 +1272,7 @@ DECL_HANDLER(queue_apc)
}
break;
case APC_CREATE_THREAD:
process = get_process_from_handle( req->process, PROCESS_CREATE_THREAD );
process = get_process_from_handle( req->handle, PROCESS_CREATE_THREAD );
break;
default:
set_error( STATUS_INVALID_PARAMETER );

View File

@ -1077,8 +1077,7 @@ static void dump_unload_dll_request( const struct unload_dll_request *req )
static void dump_queue_apc_request( const struct queue_apc_request *req )
{
fprintf( stderr, " thread=%04x,", req->thread );
fprintf( stderr, " process=%04x,", req->process );
fprintf( stderr, " handle=%04x,", req->handle );
fprintf( stderr, " call=" );
dump_apc_call( &req->call );
}