Extend EPROCESS and ETHREAD structures
All checks were successful
Builds / ExectOS (amd64, debug) (push) Successful in 27s
Builds / ExectOS (amd64, release) (push) Successful in 33s
Builds / ExectOS (i686, debug) (push) Successful in 30s
Builds / ExectOS (i686, release) (push) Successful in 38s

This commit is contained in:
2026-07-09 19:28:54 +02:00
parent 2b1ff4aa9f
commit e164370cff
2 changed files with 8 additions and 3 deletions

View File

@@ -17,6 +17,10 @@
/* Quota bypass marker */
#define PS_QUOTA_BYPASS_MARKER ((PEPROCESS_QUOTA_BLOCK)1)
/* Current process & thread handles */
#define PS_CURRENT_PROCESS_HANDLE ((HANDLE)(LONG_PTR)-1)
#define PS_CURRENT_THREAD_HANDLE ((HANDLE)(LONG_PTR)-2)
/* C/C++ specific code */
#ifndef __XTOS_ASSEMBLER__
@@ -39,7 +43,8 @@ typedef struct _EPROCESS
EX_RUNDOWN_REFERENCE RundownProtect;
HANDLE UniqueProcessId;
SIZE_T QuotaUsage[PsQuotaTypes];
UINT Reserved0;
PHANDLE_TABLE ObjectTable;
ACCESS_MASK GrantedAccess;
} EPROCESS, *PEPROCESS;
/* Kernel's representation of a process quota entry*/
@@ -64,7 +69,7 @@ typedef struct _EPROCESS_QUOTA_BLOCK
typedef struct _ETHREAD
{
KTHREAD ThreadControlBlock;
UINT Reserved0;
ACCESS_MASK GrantedAccess;
} ETHREAD, *PETHREAD;
#endif /* __XTOS_ASSEMBLER__ */

View File

@@ -265,7 +265,7 @@ EX::Handle::MapHandleToPointer(IN PHANDLE_TABLE HandleTable,
if(TableEntry)
{
/* Acquire the entry lock */
if (!LockHandleTableEntry(HandleTable, TableEntry))
if(!LockHandleTableEntry(HandleTable, TableEntry))
{
/* Lock acquisition failed, reset the pointer */
TableEntry = NULLPTR;