diff --git a/include/ntapi/nt_thread.h b/include/ntapi/nt_thread.h index 3f67129..4ba9ed4 100644 --- a/include/ntapi/nt_thread.h +++ b/include/ntapi/nt_thread.h @@ -146,8 +146,8 @@ typedef struct _nt_thread_params { __in size_t stack_size_reserve; __in nt_user_stack * stack_info __optional; __in nt_thread_context * reg_context __optional; + __out nt_cid cid; __out int32_t csrss_status; - __out uint32_t thread_id; __in void * reserved[2]; } nt_thread_params; diff --git a/src/process/ntapi_tt_create_native_process_v1.c b/src/process/ntapi_tt_create_native_process_v1.c index 22c946d..c27a583 100644 --- a/src/process/ntapi_tt_create_native_process_v1.c +++ b/src/process/ntapi_tt_create_native_process_v1.c @@ -247,7 +247,7 @@ int32_t __stdcall __ntapi_tt_create_native_process_v1(nt_create_process_params * /* all done */ params->hthread = tparams.hthread; params->cid.process_id = params->pbi.unique_process_id; - params->cid.thread_id = tparams.thread_id; + params->cid.thread_id = tparams.cid.thread_id; return status; } diff --git a/src/thread/ntapi_tt_create_thread.c b/src/thread/ntapi_tt_create_thread.c index c0ab11a..2d46996 100644 --- a/src/thread/ntapi_tt_create_thread.c +++ b/src/thread/ntapi_tt_create_thread.c @@ -355,7 +355,8 @@ int32_t __stdcall __ntapi_tt_create_thread(nt_thread_params * params) __ntapi->zw_close(params->hthread); /* and finally */ - params->thread_id = (uint32_t)cid.thread_id; + params->cid.process_id = cid.process_id; + params->cid.thread_id = cid.thread_id; return NT_STATUS_SUCCESS; }