Send the exe file handle in init_process_done request.
This commit is contained in:
parent
550ba5b47a
commit
ad29b90d08
|
@ -194,6 +194,7 @@ struct init_process_done_request
|
|||
IN void* module; /* main module base address */
|
||||
IN void* entry; /* process entry point */
|
||||
IN void* name; /* ptr to ptr to name (in process addr space) */
|
||||
IN handle_t exe_file; /* file handle for main exe */
|
||||
IN int gui; /* is it a GUI process? */
|
||||
OUT int debugged; /* being debugged? */
|
||||
};
|
||||
|
@ -1575,7 +1576,7 @@ union generic_request
|
|||
struct async_result_request async_result;
|
||||
};
|
||||
|
||||
#define SERVER_PROTOCOL_VERSION 32
|
||||
#define SERVER_PROTOCOL_VERSION 33
|
||||
|
||||
/* ### make_requests end ### */
|
||||
/* Everything above this line is generated automatically by tools/make_requests */
|
||||
|
|
|
@ -322,10 +322,11 @@ static void start_process(void)
|
|||
SERVER_START_REQ
|
||||
{
|
||||
struct init_process_done_request *req = server_alloc_req( sizeof(*req), 0 );
|
||||
req->module = (void *)current_process.module;
|
||||
req->entry = entry;
|
||||
req->name = main_exe_name;
|
||||
req->gui = !console_app;
|
||||
req->module = (void *)current_process.module;
|
||||
req->entry = entry;
|
||||
req->name = main_exe_name;
|
||||
req->exe_file = main_exe_file;
|
||||
req->gui = !console_app;
|
||||
server_call( REQ_INIT_PROCESS_DONE );
|
||||
debugged = req->debugged;
|
||||
}
|
||||
|
@ -337,7 +338,7 @@ static void start_process(void)
|
|||
if (!SIGNAL_Init()) goto error;
|
||||
|
||||
/* create the main modref and load dependencies */
|
||||
if (!(wm = PE_CreateModule( current_process.module, main_exe_name, 0, main_exe_file, FALSE )))
|
||||
if (!(wm = PE_CreateModule( current_process.module, main_exe_name, 0, 0, FALSE )))
|
||||
goto error;
|
||||
wm->refCount++;
|
||||
|
||||
|
|
|
@ -791,6 +791,7 @@ DECL_HANDLER(init_process)
|
|||
/* signal the end of the process initialization */
|
||||
DECL_HANDLER(init_process_done)
|
||||
{
|
||||
struct file *file;
|
||||
struct process *process = current->process;
|
||||
if (!process->init_event)
|
||||
{
|
||||
|
@ -799,6 +800,12 @@ DECL_HANDLER(init_process_done)
|
|||
}
|
||||
process->exe.base = req->module;
|
||||
process->exe.name = req->name;
|
||||
|
||||
if (req->exe_file && (file = get_file_obj( current->process, req->exe_file, GENERIC_READ )))
|
||||
{
|
||||
if (process->exe.file) release_object( process->exe.file );
|
||||
process->exe.file = file;
|
||||
}
|
||||
generate_startup_debug_events( current->process, req->entry );
|
||||
set_event( process->init_event );
|
||||
release_object( process->init_event );
|
||||
|
|
|
@ -333,6 +333,7 @@ static void dump_init_process_done_request( const struct init_process_done_reque
|
|||
fprintf( stderr, " module=%p,", req->module );
|
||||
fprintf( stderr, " entry=%p,", req->entry );
|
||||
fprintf( stderr, " name=%p,", req->name );
|
||||
fprintf( stderr, " exe_file=%d,", req->exe_file );
|
||||
fprintf( stderr, " gui=%d", req->gui );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue