server: Make the arguments for CreateRemoteThread client_ptr_t instead of void pointers.

This commit is contained in:
Alexandre Julliard 2008-12-30 15:30:11 +01:00
parent c86ec6445c
commit f69e62207b
5 changed files with 19 additions and 16 deletions

View File

@ -1007,16 +1007,16 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
HANDLE handle;
SIZE_T reserve = call->create_thread.reserve;
SIZE_T commit = call->create_thread.commit;
void *func = wine_server_get_ptr( call->create_thread.func );
void *arg = wine_server_get_ptr( call->create_thread.arg );
result->type = call->type;
if (reserve == call->create_thread.reserve && commit == call->create_thread.commit)
if (reserve == call->create_thread.reserve && commit == call->create_thread.commit &&
(ULONG_PTR)func == call->create_thread.func && (ULONG_PTR)arg == call->create_thread.arg)
{
result->create_thread.status = RtlCreateUserThread( NtCurrentProcess(), NULL,
call->create_thread.suspend, NULL,
reserve, commit,
call->create_thread.func,
call->create_thread.arg,
&handle, &id );
reserve, commit, func, arg, &handle, &id );
result->create_thread.handle = wine_server_obj_handle( handle );
result->create_thread.tid = HandleToULong(id.UniqueThread);
}

View File

@ -483,8 +483,8 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *
memset( &call, 0, sizeof(call) );
call.create_thread.type = APC_CREATE_THREAD;
call.create_thread.func = start;
call.create_thread.arg = param;
call.create_thread.func = wine_server_client_ptr( start );
call.create_thread.arg = wine_server_client_ptr( param );
call.create_thread.reserve = stack_reserve;
call.create_thread.commit = stack_commit;
call.create_thread.suspend = suspended;

View File

@ -362,11 +362,11 @@ typedef union
struct
{
enum apc_type type;
void (__stdcall *func)(void*);
void *arg;
int suspend;
client_ptr_t func;
client_ptr_t arg;
mem_size_t reserve;
mem_size_t commit;
int suspend;
} create_thread;
} apc_call_t;
@ -5059,6 +5059,6 @@ union generic_reply
struct set_window_layered_info_reply set_window_layered_info_reply;
};
#define SERVER_PROTOCOL_VERSION 369
#define SERVER_PROTOCOL_VERSION 370
#endif /* __WINE_WINE_SERVER_PROTOCOL_H */

View File

@ -378,11 +378,11 @@ typedef union
struct
{
enum apc_type type; /* APC_CREATE_THREAD */
void (__stdcall *func)(void*); /* start function */
void *arg; /* argument for start function */
int suspend; /* suspended thread? */
client_ptr_t func; /* void (__stdcall *func)(void*); start function */
client_ptr_t arg; /* argument for start function */
mem_size_t reserve; /* reserve size for thread stack */
mem_size_t commit; /* commit size for thread stack */
int suspend; /* suspended thread? */
} create_thread;
} apc_call_t;

View File

@ -193,8 +193,11 @@ static void dump_apc_call( const apc_call_t *call )
dump_uint64( &call->unmap_view.addr );
break;
case APC_CREATE_THREAD:
fprintf( stderr, "APC_CREATE_THREAD,func=%p,arg=%p,reserve=",
call->create_thread.func, call->create_thread.arg );
fprintf( stderr, "APC_CREATE_THREAD,func=" );
dump_uint64( &call->create_thread.func );
fprintf( stderr, ",arg=" );
dump_uint64( &call->create_thread.arg );
fprintf( stderr, ",reserve=" );
dump_uint64( &call->create_thread.reserve );
fprintf( stderr, ",commit=" );
dump_uint64( &call->create_thread.commit );