Fix incorrect OpenProcess implementation in kernel32 and make it tidier. I'm now seeing a bug with Access rights...

svn path=/trunk/; revision=14665
This commit is contained in:
Alex Ionescu 2005-04-18 05:12:36 +00:00
parent 9cafa059bd
commit 2b66d8f4fb

View file

@ -342,18 +342,13 @@ OpenProcess(DWORD dwDesiredAccess,
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;
if (bInheritHandle == TRUE)
ObjectAttributes.Attributes = OBJ_INHERIT;
else
ObjectAttributes.Attributes = 0;
InitializeObjectAttributes(&ObjectAttributes,
NULL,
(bInheritHandle ? OBJ_INHERIT : 0),
NULL,
NULL);
errCode = NtOpenProcess(&ProcessHandle,
dwDesiredAccess,