ntdll: Implement RtlCreateProcessParametersEx().

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Alexandre Julliard 2018-10-08 18:41:50 +02:00
parent fd60a33e5d
commit 2418bb1dab
3 changed files with 35 additions and 12 deletions

View File

@ -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,13 +506,33 @@ NTSTATUS WINAPI RtlCreateProcessParameters( RTL_USER_PROCESS_PARAMETERS **result
append_unicode_string( &ptr, Desktop, &params->Desktop );
append_unicode_string( &ptr, ShellInfo, &params->ShellInfo );
append_unicode_string( &ptr, RuntimeInfo, &params->RuntimeInfo );
*result = RtlDeNormalizeProcessParams( params );
*result = params;
if (!(flags & PROCESS_PARAMS_FLAG_NORMALIZED)) RtlDeNormalizeProcessParams( params );
}
RtlReleasePebLock();
return status;
}
/******************************************************************************
* 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.@]
*/

View File

@ -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)

View File

@ -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);