ReactOS  0.4.12-dev-918-g6c6e7b8
object.h
Go to the documentation of this file.
1 #pragma once
2 
3 typedef struct _USER_REFERENCE_ENTRY
4 {
8 
23 
24 static __inline VOID
26 {
27  PTHREADINFO W32Thread;
28 
29  W32Thread = PsGetCurrentThreadWin32Thread();
30  ASSERT(W32Thread != NULL);
31  ASSERT(UserReferenceEntry != NULL);
32  UserReferenceEntry->obj = obj;
34  PushEntryList(&W32Thread->ReferencesList, &UserReferenceEntry->Entry);
35 }
36 
37 static __inline VOID
39 {
40  PTHREADINFO W32Thread;
41  PSINGLE_LIST_ENTRY ReferenceEntry;
42  PUSER_REFERENCE_ENTRY UserReferenceEntry;
43  UNREFERENCED_LOCAL_VARIABLE(UserReferenceEntry);
44 
45  ASSERT(obj != NULL);
46  W32Thread = PsGetCurrentThreadWin32Thread();
47  ASSERT(W32Thread != NULL);
48  ReferenceEntry = PopEntryList(&W32Thread->ReferencesList);
49  ASSERT(ReferenceEntry != NULL);
50  UserReferenceEntry = CONTAINING_RECORD(ReferenceEntry, USER_REFERENCE_ENTRY, Entry);
51  ASSERT(UserReferenceEntry != NULL);
52 
53  ASSERT(obj == UserReferenceEntry->obj);
55 }
56 
58 
59 /* EOF */
ASMGENDATA Table[]
Definition: genincdata.c:61
PVOID FASTCALL UserReferenceObjectByHandle(HANDLE handle, HANDLE_TYPE type)
Definition: object.c:707
Definition: ntbasedef.h:635
BOOL FASTCALL UserObjectInDestroy(HANDLE)
Definition: object.c:669
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
Definition: object.h:25
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
BOOL FASTCALL UserCreateHandleTable(VOID)
Definition: object.c:503
PVOID FASTCALL ValidateHandle(HANDLE handle, HANDLE_TYPE type)
struct _USER_REFERENCE_ENTRY * PUSER_REFERENCE_ENTRY
BOOLEAN UserDestroyObjectsForOwner(PUSER_HANDLE_TABLE Table, PVOID Owner)
Definition: object.c:720
#define FASTCALL
Definition: nt_native.h:50
PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE, HANDLE, HANDLE_TYPE)
Definition: object.c:448
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define UNREFERENCED_LOCAL_VARIABLE(L)
Definition: ntbasedef.h:324
GLsizei GLsizei GLuint * obj
Definition: glext.h:6042
FORCEINLINE VOID PushEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY Entry)
Definition: rtlfuncs.h:253
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL FASTCALL UserMarkObjectDestroy(PVOID)
Definition: object.c:587
static __inline VOID UserDerefObjectCo(PVOID obj)
Definition: object.h:38
PVOID obj
Definition: object.h:6
Definition: object.h:3
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
FORCEINLINE PSINGLE_LIST_ENTRY PopEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead)
Definition: rtlfuncs.h:240
GLsizeiptr size
Definition: glext.h:5919
PVOID FASTCALL UserCreateObject(PUSER_HANDLE_TABLE ht, struct _DESKTOP *pDesktop, PTHREADINFO pti, HANDLE *h, HANDLE_TYPE type, ULONG size)
static IUnknown Object
Definition: main.c:512
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
SINGLE_LIST_ENTRY Entry
Definition: object.h:5
BOOL FASTCALL UserDereferenceObject(PVOID obj)
Definition: object.c:610
void FreeProcMarkObject(_In_ PVOID Object)
Definition: object.c:175
#define _In_
Definition: no_sal2.h:204
enum _HANDLE_TYPE HANDLE_TYPE
static const struct newhuff ht[]
Definition: huffman.h:296
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
Definition: rtlfuncs.h:1557
void DbgUserDumpHandleTable()
SINGLE_LIST_ENTRY ReferencesList
Definition: win32.h:151
unsigned int ULONG
Definition: retypes.h:1
BOOL FASTCALL UserDeleteObject(HANDLE h, HANDLE_TYPE type)
Definition: object.c:683
VOID FASTCALL UserReferenceObject(PVOID obj)
Definition: object.c:697
base of all file and directory entries
Definition: entries.h:82
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:462
struct _USER_REFERENCE_ENTRY USER_REFERENCE_ENTRY