ntdll: add RtlCreateUserProcess stub (try 2)
Sebastian Lackner
sebastian at fds-team.de
Mon Jan 4 10:49:40 CST 2016
On 28.12.2015 00:58, Austin English wrote:
> Using info from http://www.rohitab.com/discuss/topic/40191-ntcreateuserprocess/
>
> Fixes https://bugs.winehq.org/show_bug.cgi?id=38722
>
> Try 2: fix prototypes
>
> -- -Austin
>
>
> 0001-ntdll-add-RtlCreateUserProcess-stub-try-2.patch
>
>
> From 27f4ac611c2d7c9b0d778519fc6eb9675dbd6b09 Mon Sep 17 00:00:00 2001
> From: Austin English <austinenglish at gmail.com>
> Date: Tue, 15 Dec 2015 01:51:05 -0600
> Subject: [PATCH] ntdll: add RtlCreateUserProcess stub (try 2)
>
> Signed-off-by: Austin English <austinenglish at gmail.com>
> ---
> dlls/ntdll/ntdll.spec | 2 +-
> dlls/ntdll/rtl.c | 13 +++++++++++++
> include/winternl.h | 10 ++++++++++
> 3 files changed, 24 insertions(+), 1 deletion(-)
>
> diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
> index c3b6bf0..b8abc9c 100644
> --- a/dlls/ntdll/ntdll.spec
> +++ b/dlls/ntdll/ntdll.spec
> @@ -505,7 +505,7 @@
> @ stdcall RtlCreateTimerQueue(ptr)
> @ stdcall RtlCreateUnicodeString(ptr wstr)
> @ stdcall RtlCreateUnicodeStringFromAsciiz(ptr str)
> -@ stub RtlCreateUserProcess
> +@ stdcall RtlCreateUserProcess(ptr long ptr ptr ptr long long long long ptr)
> @ stub RtlCreateUserSecurityObject
> @ stdcall RtlCreateUserThread(long ptr long ptr long long ptr ptr ptr ptr)
> @ stub RtlCustomCPToUnicodeN
> diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
> index 8eb3e9f..1c9b50d 100644
> --- a/dlls/ntdll/rtl.c
> +++ b/dlls/ntdll/rtl.c
> @@ -1595,3 +1595,16 @@ void WINAPI RtlGetCurrentProcessorNumberEx(PROCESSOR_NUMBER *processor)
> processor->Number = NtGetCurrentProcessorNumber();
> processor->Reserved = 0;
> }
This needs rebasing, your RtlInsertElementGenericTableAvl() implementation conflicts here.
> +
> +/**********************************************************************
> + * RtlCreateUserProcess [NTDLL.@]
> + */
> +NTSTATUS WINAPI RtlCreateUserProcess(UNICODE_STRING *path, ULONG attributes, RTL_USER_PROCESS_PARAMETERS *parameters,
> + SECURITY_DESCRIPTOR *process_descriptor, SECURITY_DESCRIPTOR *thread_descriptor,
> + HANDLE parent, BOOLEAN inherit, HANDLE debug, HANDLE exception,
> + RTL_USER_PROCESS_INFORMATION *info)
> +{
> + FIXME("(%p %u %p %p %p %p %d %p %p %p): stub\n", path, attributes, parameters, process_descriptor, thread_descriptor,
> + parent, inherit, debug, exception, info);
> + return STATUS_NOT_IMPLEMENTED;
> +}
> diff --git a/include/winternl.h b/include/winternl.h
> index ecd5791..69b7b2d 100644
> --- a/include/winternl.h
> +++ b/include/winternl.h
> @@ -1892,6 +1892,15 @@ typedef struct _LPC_MESSAGE {
> UCHAR Data[ANYSIZE_ARRAY];
> } LPC_MESSAGE, *PLPC_MESSAGE;
>
> +typedef struct _RTL_USER_PROCESS_INFORMATION
> +{
> + ULONG Length;
Most definitions I have found call this field "Size", not "Length".
Based on which header files is your patch?
> + HANDLE Process;
> + HANDLE Thread;
> + CLIENT_ID ClientId;
> + SECTION_IMAGE_INFORMATION ImageInformation;
> +} RTL_USER_PROCESS_INFORMATION, *PRTL_USER_PROCESS_INFORMATION;
> +
> typedef enum _SHUTDOWN_ACTION {
> ShutdownNoReboot,
> ShutdownReboot,
> @@ -2391,6 +2400,7 @@ NTSYSAPI NTSTATUS WINAPI RtlCreateTimerQueue(PHANDLE);
> NTSYSAPI NTSTATUS WINAPI RtlCreateTimer(PHANDLE, HANDLE, RTL_WAITORTIMERCALLBACKFUNC, PVOID, DWORD, DWORD, ULONG);
> NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
> NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeStringFromAsciiz(PUNICODE_STRING,LPCSTR);
> +NTSYSAPI NTSTATUS WINAPI RtlCreateUserProcess(UNICODE_STRING *, ULONG, RTL_USER_PROCESS_PARAMETERS *, SECURITY_DESCRIPTOR *, SECURITY_DESCRIPTOR *, HANDLE, BOOLEAN, HANDLE, HANDLE, RTL_USER_PROCESS_INFORMATION *);
> NTSYSAPI NTSTATUS WINAPI RtlCreateUserThread(HANDLE,const SECURITY_DESCRIPTOR*,BOOLEAN,PVOID,SIZE_T,SIZE_T,PRTL_THREAD_START_ROUTINE,void*,HANDLE*,CLIENT_ID*);
> NTSYSAPI void WINAPI RtlDeactivateActivationContext(DWORD,ULONG_PTR);
> NTSYSAPI PVOID WINAPI RtlDecodePointer(PVOID);
> -- 2.6.4
>
More information about the wine-devel
mailing list