ReactOS 0.4.15-dev-7788-g1ad9096
object.h
Go to the documentation of this file.
1#pragma once
2
4{
8
25
26static __inline VOID
28{
29 PTHREADINFO W32Thread;
30
32 ASSERT(W32Thread != NULL);
33 ASSERT(UserReferenceEntry != NULL);
34 UserReferenceEntry->obj = obj;
36 PushEntryList(&W32Thread->ReferencesList, &UserReferenceEntry->Entry);
37}
38
39static __inline VOID
41{
42 PTHREADINFO W32Thread;
43 PSINGLE_LIST_ENTRY ReferenceEntry;
44 PUSER_REFERENCE_ENTRY UserReferenceEntry;
45
46 ASSERT(obj != NULL);
48 ASSERT(W32Thread != NULL);
49 ReferenceEntry = PopEntryList(&W32Thread->ReferencesList);
50 ASSERT(ReferenceEntry != NULL);
51 UserReferenceEntry = CONTAINING_RECORD(ReferenceEntry, USER_REFERENCE_ENTRY, Entry);
52 ASSERT(UserReferenceEntry != NULL);
53
54 ASSERT(obj == UserReferenceEntry->obj);
56}
57
59
60/* EOF */
unsigned char BOOLEAN
#define NULL
Definition: types.h:112
unsigned int BOOL
Definition: ntddk_ex.h:94
ASMGENDATA Table[]
Definition: genincdata.c:61
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
static const struct newhuff ht[]
Definition: huffman.h:296
enum _HANDLE_TYPE HANDLE_TYPE
#define ASSERT(a)
Definition: mode.c:44
#define _In_
Definition: ms_sal.h:308
_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:1597
#define FASTCALL
Definition: nt_native.h:50
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:495
BOOLEAN UserDestroyObjectsForOwner(PUSER_HANDLE_TABLE Table, PVOID Owner)
Definition: object.c:754
struct _USER_REFERENCE_ENTRY USER_REFERENCE_ENTRY
static __inline VOID UserDerefObjectCo(PVOID obj)
Definition: object.h:40
PVOID FASTCALL UserAssignmentLock(PVOID *ppvObj, PVOID pvNew)
Definition: object.c:839
static __inline VOID UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
Definition: object.h:27
PVOID FASTCALL UserCreateObject(PUSER_HANDLE_TABLE ht, struct _DESKTOP *pDesktop, PTHREADINFO pti, HANDLE *h, HANDLE_TYPE type, ULONG size)
PVOID FASTCALL UserReferenceObjectByHandle(HANDLE handle, HANDLE_TYPE type)
Definition: object.c:741
BOOL FASTCALL UserDeleteObject(HANDLE h, HANDLE_TYPE type)
Definition: object.c:717
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
BOOL FASTCALL UserObjectInDestroy(HANDLE)
Definition: object.c:703
PVOID FASTCALL ValidateHandle(HANDLE handle, HANDLE_TYPE type)
void FreeProcMarkObject(_In_ PVOID Object)
Definition: object.c:175
struct _USER_REFERENCE_ENTRY * PUSER_REFERENCE_ENTRY
BOOL FASTCALL UserCreateHandleTable(VOID)
Definition: object.c:536
BOOL FASTCALL UserDereferenceObject(PVOID obj)
Definition: object.c:644
BOOL FASTCALL UserMarkObjectDestroy(PVOID)
Definition: object.c:621
void DbgUserDumpHandleTable()
PVOID FASTCALL UserAssignmentUnlock(PVOID *ppvObj)
Definition: object.c:860
PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE, HANDLE, HANDLE_TYPE)
Definition: object.c:481
VOID FASTCALL UserReferenceObject(PVOID obj)
Definition: object.c:731
base of all file and directory entries
Definition: entries.h:83
Definition: ntbasedef.h:628
SINGLE_LIST_ENTRY ReferencesList
Definition: win32.h:157
Definition: object.h:4
SINGLE_LIST_ENTRY Entry
Definition: object.h:5
PVOID obj
Definition: object.h:6
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
FORCEINLINE VOID PushEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY Entry)
Definition: rtlfuncs.h:253
FORCEINLINE PSINGLE_LIST_ENTRY PopEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead)
Definition: rtlfuncs.h:240