From 500354ef264f35a46a31643876b06ed614b0aed8 Mon Sep 17 00:00:00 2001 From: RadWolfie Date: Sat, 27 May 2023 05:56:32 +0000 Subject: [PATCH] xboxkrnl: add OBJECT_HEADER structure --- lib/xboxkrnl/xboxdef.h | 2 ++ lib/xboxkrnl/xboxkrnl.h | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib/xboxkrnl/xboxdef.h b/lib/xboxkrnl/xboxdef.h index e2d691d8e..0e825b7ee 100644 --- a/lib/xboxkrnl/xboxdef.h +++ b/lib/xboxkrnl/xboxdef.h @@ -41,6 +41,8 @@ typedef unsigned int SIZE_T, *PSIZE_T; typedef int BOOL, *PBOOL; typedef const char *PCSZ, *PCSTR, *LPCSTR; +typedef ULONGLONG QUAD; + typedef ULONG ULONG_PTR; typedef LONG LONG_PTR; diff --git a/lib/xboxkrnl/xboxkrnl.h b/lib/xboxkrnl/xboxkrnl.h index 24131482c..bf92caf93 100644 --- a/lib/xboxkrnl/xboxkrnl.h +++ b/lib/xboxkrnl/xboxkrnl.h @@ -891,6 +891,16 @@ typedef struct _OBJECT_TYPE ULONG PoolTag; } OBJECT_TYPE, *POBJECT_TYPE; +typedef struct _OBJECT_HEADER { + LONG PointerCount; + LONG HandleCount; + POBJECT_TYPE Type; + ULONG Flags; + QUAD Body; +} OBJECT_HEADER, *POBJECT_HEADER; + +#define OBJECT_TO_OBJECT_HEADER(Object) CONTAINING_RECORD(Object, OBJECT_HEADER, Body) + typedef VOID (NTAPI *PKDEFERRED_ROUTINE) ( IN PKDPC Dpc, IN PVOID DeferredContext,