summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-01-27 02:33:11 (GMT)
committermidipix <writeonce@midipix.org>2018-01-27 02:33:11 (GMT)
commit29b2c1ac5e3c1b8ba1e54084a7e687abd5f8114d (patch)
treeeafdad8092797570a4ecccc5a0d7df28a9c89582
parentc8a12604d8e4531ac8e2bf7759ea369d6ab54d69 (diff)
downloadntapi-29b2c1ac5e.tar.bz2
ntapi-29b2c1ac5e.tar.xz
struct _nt_spawn_process_params: foreign process creation: support passing cwd.
-rw-r--r--include/ntapi/nt_process.h3
-rw-r--r--src/process/ntapi_tt_spawn_foreign_process.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/ntapi/nt_process.h b/include/ntapi/nt_process.h
index ddb3753..7a649ad 100644
--- a/include/ntapi/nt_process.h
+++ b/include/ntapi/nt_process.h
@@ -692,8 +692,9 @@ typedef struct _nt_spawn_process_params {
__out nt_process_basic_information pbi;
__out nt_event_basic_information eready;
__in nt_runtime_data * rtctx;
- __in void * hroot;
+ __in wchar16_t * cwd;
__in void * hcwd;
+ __in void * hroot;
__in void * hsession;
__in void * htoken;
__in void * himage;
diff --git a/src/process/ntapi_tt_spawn_foreign_process.c b/src/process/ntapi_tt_spawn_foreign_process.c
index b5c4e38..716468c 100644
--- a/src/process/ntapi_tt_spawn_foreign_process.c
+++ b/src/process/ntapi_tt_spawn_foreign_process.c
@@ -341,7 +341,7 @@ int32_t __stdcall __ntapi_tt_spawn_foreign_process(nt_spawn_process_params * spa
finherit,
sparams->interopflags | fsuspended,
0,
- 0,
+ sparams->cwd,
sparams->startupinfo,
&processinfo)))
return __tt_spawn_return(