mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:33:10 +00:00
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:
parent
cbd89b1469
commit
3e19a65825
3 changed files with 13 additions and 4 deletions
|
@ -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
|
#ifndef _INCLUDE_DDK_PSFUNCS_H
|
||||||
#define _INCLUDE_DDK_PSFUNCS_H
|
#define _INCLUDE_DDK_PSFUNCS_H
|
||||||
|
@ -6,7 +6,12 @@
|
||||||
NTSTATUS STDCALL PsAssignImpersonationToken (struct _ETHREAD* Thread,
|
NTSTATUS STDCALL PsAssignImpersonationToken (struct _ETHREAD* Thread,
|
||||||
HANDLE TokenHandle);
|
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 PsGetCurrentProcessId(VOID);
|
||||||
|
|
||||||
HANDLE STDCALL PsGetCurrentThreadId(VOID);
|
HANDLE STDCALL PsGetCurrentThreadId(VOID);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -590,9 +590,9 @@ RtlpGetRegistryHandle(ULONG RelativeTo,
|
||||||
|
|
||||||
if (RelativeTo & RTL_REGISTRY_HANDLE)
|
if (RelativeTo & RTL_REGISTRY_HANDLE)
|
||||||
{
|
{
|
||||||
Status = NtDuplicateObject(PsGetCurrentProcessId(),
|
Status = NtDuplicateObject(NtCurrentProcess(),
|
||||||
(HANDLE)Path,
|
(HANDLE)Path,
|
||||||
PsGetCurrentProcessId(),
|
NtCurrentProcess(),
|
||||||
KeyHandle,
|
KeyHandle,
|
||||||
0,
|
0,
|
||||||
FALSE,
|
FALSE,
|
||||||
|
|
|
@ -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
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -491,6 +491,10 @@ KeGetCurrentProcess(VOID)
|
||||||
return(&(PsGetCurrentProcess()->Pcb));
|
return(&(PsGetCurrentProcess()->Pcb));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Warning: Even though it returns HANDLE, it's not a real HANDLE but really a
|
||||||
|
* ULONG ProcessId! (Skywing)
|
||||||
|
*/
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue