Alexandre Julliard : ntdll: Implement RtlCreateProcessParametersEx().
Alexandre Julliard
julliard at winehq.org
Mon Oct 8 15:44:07 CDT 2018
Module: wine
Branch: master
Commit: 2418bb1dabfae292636d0339c9397167cc1f8663
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2418bb1dabfae292636d0339c9397167cc1f8663
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Oct 8 18:41:50 2018 +0200
ntdll: Implement RtlCreateProcessParametersEx().
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/env.c | 45 +++++++++++++++++++++++++++++++++------------
dlls/ntdll/ntdll.spec | 1 +
include/winternl.h | 1 +
3 files changed, 35 insertions(+), 12 deletions(-)
diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c
index 1428a1b..9288713 100644
--- a/dlls/ntdll/env.c
+++ b/dlls/ntdll/env.c
@@ -434,18 +434,19 @@ static void append_unicode_string( void **data, const UNICODE_STRING *src,
/******************************************************************************
- * RtlCreateProcessParameters [NTDLL.@]
+ * RtlCreateProcessParametersEx [NTDLL.@]
*/
-NTSTATUS WINAPI RtlCreateProcessParameters( RTL_USER_PROCESS_PARAMETERS **result,
- const UNICODE_STRING *ImagePathName,
- const UNICODE_STRING *DllPath,
- const UNICODE_STRING *CurrentDirectoryName,
- const UNICODE_STRING *CommandLine,
- PWSTR Environment,
- const UNICODE_STRING *WindowTitle,
- const UNICODE_STRING *Desktop,
- const UNICODE_STRING *ShellInfo,
- const UNICODE_STRING *RuntimeInfo )
+NTSTATUS WINAPI RtlCreateProcessParametersEx( RTL_USER_PROCESS_PARAMETERS **result,
+ const UNICODE_STRING *ImagePathName,
+ const UNICODE_STRING *DllPath,
+ const UNICODE_STRING *CurrentDirectoryName,
+ const UNICODE_STRING *CommandLine,
+ PWSTR Environment,
+ const UNICODE_STRING *WindowTitle,
+ const UNICODE_STRING *Desktop,
+ const UNICODE_STRING *ShellInfo,
+ const UNICODE_STRING *RuntimeInfo,
+ ULONG flags )
{
static WCHAR empty[] = {0};
static const UNICODE_STRING empty_str = { 0, sizeof(empty), empty };
@@ -505,7 +506,8 @@ NTSTATUS WINAPI RtlCreateProcessParameters( RTL_USER_PROCESS_PARAMETERS **result
append_unicode_string( &ptr, Desktop, ¶ms->Desktop );
append_unicode_string( &ptr, ShellInfo, ¶ms->ShellInfo );
append_unicode_string( &ptr, RuntimeInfo, ¶ms->RuntimeInfo );
- *result = RtlDeNormalizeProcessParams( params );
+ *result = params;
+ if (!(flags & PROCESS_PARAMS_FLAG_NORMALIZED)) RtlDeNormalizeProcessParams( params );
}
RtlReleasePebLock();
return status;
@@ -513,6 +515,25 @@ NTSTATUS WINAPI RtlCreateProcessParameters( RTL_USER_PROCESS_PARAMETERS **result
/******************************************************************************
+ * RtlCreateProcessParameters [NTDLL.@]
+ */
+NTSTATUS WINAPI RtlCreateProcessParameters( RTL_USER_PROCESS_PARAMETERS **result,
+ const UNICODE_STRING *image,
+ const UNICODE_STRING *dllpath,
+ const UNICODE_STRING *curdir,
+ const UNICODE_STRING *cmdline,
+ PWSTR env,
+ const UNICODE_STRING *title,
+ const UNICODE_STRING *desktop,
+ const UNICODE_STRING *shellinfo,
+ const UNICODE_STRING *runtime )
+{
+ return RtlCreateProcessParametersEx( result, image, dllpath, curdir, cmdline,
+ env, title, desktop, shellinfo, runtime, 0 );
+}
+
+
+/******************************************************************************
* RtlDestroyProcessParameters [NTDLL.@]
*/
void WINAPI RtlDestroyProcessParameters( RTL_USER_PROCESS_PARAMETERS *params )
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index b7cbff3..d1797b3 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -512,6 +512,7 @@
@ stdcall RtlCreateEnvironment(long ptr)
@ stdcall RtlCreateHeap(long ptr long long ptr ptr)
@ stdcall RtlCreateProcessParameters(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr)
+@ stdcall RtlCreateProcessParametersEx(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr long)
@ stub RtlCreatePropertySet
@ stdcall RtlCreateQueryDebugBuffer(long long)
@ stdcall RtlCreateRegistryKey(long wstr)
diff --git a/include/winternl.h b/include/winternl.h
index 74f49a1..77c95ec 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2609,6 +2609,7 @@ NTSYSAPI NTSTATUS WINAPI RtlCreateAtomTable(ULONG,RTL_ATOM_TABLE*);
NTSYSAPI NTSTATUS WINAPI RtlCreateEnvironment(BOOLEAN, PWSTR*);
NTSYSAPI HANDLE WINAPI RtlCreateHeap(ULONG,PVOID,SIZE_T,SIZE_T,PVOID,PRTL_HEAP_DEFINITION);
NTSYSAPI NTSTATUS WINAPI RtlCreateProcessParameters(RTL_USER_PROCESS_PARAMETERS**,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,PWSTR,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*);
+NTSYSAPI NTSTATUS WINAPI RtlCreateProcessParametersEx(RTL_USER_PROCESS_PARAMETERS**,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,PWSTR,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,const UNICODE_STRING*,ULONG);
NTSYSAPI NTSTATUS WINAPI RtlCreateSecurityDescriptor(PSECURITY_DESCRIPTOR,DWORD);
NTSYSAPI NTSTATUS WINAPI RtlCreateTimerQueue(PHANDLE);
NTSYSAPI NTSTATUS WINAPI RtlCreateTimer(PHANDLE, HANDLE, RTL_WAITORTIMERCALLBACKFUNC, PVOID, DWORD, DWORD, ULONG);
More information about the wine-cvs
mailing list