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; CLIENT_ID ClientId;
ClientId.UniqueProcess = (HANDLE)dwProcessId; ClientId.UniqueProcess = (HANDLE)dwProcessId;
ClientId.UniqueThread = INVALID_HANDLE_VALUE; ClientId.UniqueThread = 0;
ObjectAttributes.Length = sizeof(OBJECT_ATTRIBUTES); InitializeObjectAttributes(&ObjectAttributes,
ObjectAttributes.RootDirectory = (HANDLE)NULL; NULL,
ObjectAttributes.SecurityDescriptor = NULL; (bInheritHandle ? OBJ_INHERIT : 0),
ObjectAttributes.SecurityQualityOfService = NULL; NULL,
ObjectAttributes.ObjectName = NULL; NULL);
if (bInheritHandle == TRUE)
ObjectAttributes.Attributes = OBJ_INHERIT;
else
ObjectAttributes.Attributes = 0;
errCode = NtOpenProcess(&ProcessHandle, errCode = NtOpenProcess(&ProcessHandle,
dwDesiredAccess, dwDesiredAccess,