Fix incorrect OpenProcess implementation in kernel32 and make it tidier.
I'm now seeing a bug with Access rights...
Modified: trunk/reactos/lib/kernel32/process/proc.c
_____
Modified: trunk/reactos/lib/kernel32/process/proc.c
--- trunk/reactos/lib/kernel32/process/proc.c 2005-04-18 04:55:48 UTC
(rev 14664)
+++ trunk/reactos/lib/kernel32/process/proc.c 2005-04-18 05:12:36 UTC
(rev 14665)
@@ -342,19 +342,14 @@
CLIENT_ID ClientId;
ClientId.UniqueProcess = (HANDLE)dwProcessId;
- ClientId.UniqueThread = INVALID_HANDLE_VALUE;
+ ClientId.UniqueThread = 0;
- ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES);
- ObjectAttributes.RootDirectory = (HANDLE)NULL;
- ObjectAttributes.SecurityDescriptor = NULL;
- ObjectAttributes.SecurityQualityOfService = NULL;
- ObjectAttributes.ObjectName = NULL;
+ InitializeObjectAttributes(&ObjectAttributes,
+ NULL,
+ (bInheritHandle ? OBJ_INHERIT : 0),
+ NULL,
+ NULL);
- if (bInheritHandle == TRUE)
- ObjectAttributes.Attributes = OBJ_INHERIT;
- else
- ObjectAttributes.Attributes = 0;
-
errCode = NtOpenProcess(&ProcessHandle,
dwDesiredAccess,
&ObjectAttributes,
Show replies by date