Patch by Skywing.

- Added notice about PsGetCurrentProcessId not returning a real handle.
- Changed PsGetCurrentProcessId() to NtCurrentProcess() in RtlpGetRegistryHandle.
(I am still not sure if it works correctly, but it crashes otherwise!)

svn path=/trunk/; revision=6231
This commit is contained in:
Filip Navara 2003-10-04 18:19:17 +00:00
parent cbd89b1469
commit 3e19a65825
3 changed files with 13 additions and 4 deletions

View file

@ -1,4 +1,4 @@
/* $Id: psfuncs.h,v 1.26 2003/08/25 01:37:47 sedwards Exp $
/* $Id: psfuncs.h,v 1.27 2003/10/04 18:19:17 navaraf Exp $
*/
#ifndef _INCLUDE_DDK_PSFUNCS_H
#define _INCLUDE_DDK_PSFUNCS_H
@ -6,7 +6,12 @@
NTSTATUS STDCALL PsAssignImpersonationToken (struct _ETHREAD* Thread,
HANDLE TokenHandle);
/*
* Warning: Even though it returns HANDLE, it's not a real HANDLE but really a
* ULONG ProcessId! (Skywing)
*/
HANDLE STDCALL PsGetCurrentProcessId(VOID);
HANDLE STDCALL PsGetCurrentThreadId(VOID);
/*

View file

@ -590,9 +590,9 @@ RtlpGetRegistryHandle(ULONG RelativeTo,
if (RelativeTo & RTL_REGISTRY_HANDLE)
{
Status = NtDuplicateObject(PsGetCurrentProcessId(),
Status = NtDuplicateObject(NtCurrentProcess(),
(HANDLE)Path,
PsGetCurrentProcessId(),
NtCurrentProcess(),
KeyHandle,
0,
FALSE,

View file

@ -1,4 +1,4 @@
/* $Id: process.c,v 1.116 2003/09/25 20:08:36 ekohl Exp $
/* $Id: process.c,v 1.117 2003/10/04 18:19:17 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -491,6 +491,10 @@ KeGetCurrentProcess(VOID)
return(&(PsGetCurrentProcess()->Pcb));
}
/*
* Warning: Even though it returns HANDLE, it's not a real HANDLE but really a
* ULONG ProcessId! (Skywing)
*/
/*
* @implemented
*/