From e27358ea5c86ec2ab0cae53af92fa561e4acb0d3 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 21 Feb 2006 20:08:19 +0100 Subject: [PATCH] server: Remove no longer needed fields in the init_process_done request. --- dlls/ntdll/loader.c | 8 +++----- include/wine/server_protocol.h | 5 +---- server/process.c | 15 ++------------- server/protocol.def | 3 --- server/trace.c | 6 +----- 5 files changed, 7 insertions(+), 30 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 547eb5100d3..aa23017b363 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2066,16 +2066,14 @@ void WINAPI LdrInitializeThunk( ULONG unknown1, ULONG unknown2, ULONG unknown3, SERVER_START_REQ( init_process_done ) { req->module = peb->ImageBaseAddress; - req->module_size = wm->ldr.SizeOfImage; req->entry = (char *)peb->ImageBaseAddress + nt->OptionalHeader.AddressOfEntryPoint; - /* API requires a double indirection */ - req->name = &wm->ldr.FullDllName.Buffer; req->gui = (nt->OptionalHeader.Subsystem != IMAGE_SUBSYSTEM_WINDOWS_CUI); - wine_server_add_data( req, wm->ldr.FullDllName.Buffer, wm->ldr.FullDllName.Length ); - wine_server_call( req ); + status = wine_server_call( req ); } SERVER_END_REQ; + if (status != STATUS_SUCCESS) goto error; + RtlEnterCriticalSection( &loader_section ); load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer; diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h index 9ba7cce3239..1de45312787 100644 --- a/include/wine/server_protocol.h +++ b/include/wine/server_protocol.h @@ -261,11 +261,8 @@ struct init_process_done_request { struct request_header __header; void* module; - size_t module_size; void* entry; - void* name; int gui; - /* VARARG(filename,unicode_str); */ }; struct init_process_done_reply { @@ -4364,6 +4361,6 @@ union generic_reply struct query_symlink_reply query_symlink_reply; }; -#define SERVER_PROTOCOL_VERSION 227 +#define SERVER_PROTOCOL_VERSION 228 #endif /* __WINE_WINE_SERVER_PROTOCOL_H */ diff --git a/server/process.c b/server/process.c index 8c713349293..cc88c5fdc18 100644 --- a/server/process.c +++ b/server/process.c @@ -968,21 +968,10 @@ DECL_HANDLER(init_process_done) fatal_protocol_error( current, "init_process_done: called twice\n" ); return; } - if (!req->module) - { - fatal_protocol_error( current, "init_process_done: module base address cannot be 0\n" ); - return; - } - - /* check if main exe has been registered as a dll already */ if (!(dll = find_process_dll( process, req->module ))) { - if (!(dll = process_load_dll( process, NULL, req->module, - get_req_data(), get_req_data_size() ))) return; - dll->size = req->module_size; - dll->dbg_offset = 0; - dll->dbg_size = 0; - dll->name = req->name; + set_error( STATUS_DLL_NOT_FOUND ); + return; } /* main exe is the first in the dll list */ diff --git a/server/protocol.def b/server/protocol.def index 6d7f52726f4..b489b260610 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -255,11 +255,8 @@ struct security_descriptor /* Signal the end of the process initialization */ @REQ(init_process_done) void* module; /* main module base address */ - size_t module_size; /* main module size */ void* entry; /* process entry point */ - void* name; /* ptr to ptr to name (in process addr space) */ int gui; /* is it a GUI process? */ - VARARG(filename,unicode_str); /* file name of main exe */ @END diff --git a/server/trace.c b/server/trace.c index d1c702ec20c..87390f1e154 100644 --- a/server/trace.c +++ b/server/trace.c @@ -638,12 +638,8 @@ static void dump_get_startup_info_reply( const struct get_startup_info_reply *re static void dump_init_process_done_request( const struct init_process_done_request *req ) { fprintf( stderr, " module=%p,", req->module ); - fprintf( stderr, " module_size=%lu,", (unsigned long)req->module_size ); fprintf( stderr, " entry=%p,", req->entry ); - fprintf( stderr, " name=%p,", req->name ); - fprintf( stderr, " gui=%d,", req->gui ); - fprintf( stderr, " filename=" ); - dump_varargs_unicode_str( cur_size ); + fprintf( stderr, " gui=%d", req->gui ); } static void dump_init_thread_request( const struct init_thread_request *req )