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* module; /* main module base address */
|
||||||
IN void* entry; /* process entry point */
|
IN void* entry; /* process entry point */
|
||||||
IN void* name; /* ptr to ptr to name (in process addr space) */
|
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? */
|
IN int gui; /* is it a GUI process? */
|
||||||
OUT int debugged; /* being debugged? */
|
OUT int debugged; /* being debugged? */
|
||||||
};
|
};
|
||||||
@ -1575,7 +1576,7 @@ union generic_request
|
|||||||
struct async_result_request async_result;
|
struct async_result_request async_result;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SERVER_PROTOCOL_VERSION 32
|
#define SERVER_PROTOCOL_VERSION 33
|
||||||
|
|
||||||
/* ### make_requests end ### */
|
/* ### make_requests end ### */
|
||||||
/* Everything above this line is generated automatically by tools/make_requests */
|
/* Everything above this line is generated automatically by tools/make_requests */
|
||||||
|
@ -325,6 +325,7 @@ static void start_process(void)
|
|||||||
req->module = (void *)current_process.module;
|
req->module = (void *)current_process.module;
|
||||||
req->entry = entry;
|
req->entry = entry;
|
||||||
req->name = main_exe_name;
|
req->name = main_exe_name;
|
||||||
|
req->exe_file = main_exe_file;
|
||||||
req->gui = !console_app;
|
req->gui = !console_app;
|
||||||
server_call( REQ_INIT_PROCESS_DONE );
|
server_call( REQ_INIT_PROCESS_DONE );
|
||||||
debugged = req->debugged;
|
debugged = req->debugged;
|
||||||
@ -337,7 +338,7 @@ static void start_process(void)
|
|||||||
if (!SIGNAL_Init()) goto error;
|
if (!SIGNAL_Init()) goto error;
|
||||||
|
|
||||||
/* create the main modref and load dependencies */
|
/* 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;
|
goto error;
|
||||||
wm->refCount++;
|
wm->refCount++;
|
||||||
|
|
||||||
|
@ -791,6 +791,7 @@ DECL_HANDLER(init_process)
|
|||||||
/* signal the end of the process initialization */
|
/* signal the end of the process initialization */
|
||||||
DECL_HANDLER(init_process_done)
|
DECL_HANDLER(init_process_done)
|
||||||
{
|
{
|
||||||
|
struct file *file;
|
||||||
struct process *process = current->process;
|
struct process *process = current->process;
|
||||||
if (!process->init_event)
|
if (!process->init_event)
|
||||||
{
|
{
|
||||||
@ -799,6 +800,12 @@ DECL_HANDLER(init_process_done)
|
|||||||
}
|
}
|
||||||
process->exe.base = req->module;
|
process->exe.base = req->module;
|
||||||
process->exe.name = req->name;
|
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 );
|
generate_startup_debug_events( current->process, req->entry );
|
||||||
set_event( process->init_event );
|
set_event( process->init_event );
|
||||||
release_object( 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, " module=%p,", req->module );
|
||||||
fprintf( stderr, " entry=%p,", req->entry );
|
fprintf( stderr, " entry=%p,", req->entry );
|
||||||
fprintf( stderr, " name=%p,", req->name );
|
fprintf( stderr, " name=%p,", req->name );
|
||||||
|
fprintf( stderr, " exe_file=%d,", req->exe_file );
|
||||||
fprintf( stderr, " gui=%d", req->gui );
|
fprintf( stderr, " gui=%d", req->gui );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user