ReactOS  0.4.15-dev-5488-ge316d61
object.c File Reference
#include <win32k.h>
Include dependency graph for object.c:

Go to the source code of this file.

Functions

 DBG_DEFAULT_CHANNEL (UserObj)
 
 _Success_ (return!=NULL)
 
static void FreeThreadObject (_In_ PVOID Object)
 
static void FreeDeskThreadObject (_In_ PVOID Object)
 
static void FreeDeskProcObject (_In_ PVOID Object)
 
void FreeProcMarkObject (_In_ PVOID Object)
 
static void FreeSysObject (_In_ PVOID Object)
 
static void FreeSysObjectCB (_In_ PVOID Object)
 
PUSER_HANDLE_ENTRY handle_to_entry (PUSER_HANDLE_TABLE ht, HANDLE handle)
 
static __inline HANDLE entry_to_handle (PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY ptr)
 
static __inline PUSER_HANDLE_ENTRY alloc_user_entry (PUSER_HANDLE_TABLE ht)
 
VOID UserInitHandleTable (PUSER_HANDLE_TABLE ht, PVOID mem, ULONG bytes)
 
static __inline voidfree_user_entry (PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY entry)
 
HANDLE UserAllocHandle (_Inout_ PUSER_HANDLE_TABLE ht, _In_ PVOID object, _In_ HANDLE_TYPE type, _In_ PVOID HandleOwner)
 
PVOID UserGetObjectNoErr (PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
 
PVOID UserGetObject (PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
 
HANDLE get_user_full_handle (PUSER_HANDLE_TABLE ht, HANDLE handle)
 
voidget_user_object_handle (PUSER_HANDLE_TABLE ht, HANDLE *handle, HANDLE_TYPE type)
 
BOOL FASTCALL UserCreateHandleTable (VOID)
 
PVOID FASTCALL UserCreateObject (PUSER_HANDLE_TABLE ht, PDESKTOP pDesktop, PTHREADINFO pti, HANDLE *h, HANDLE_TYPE type, ULONG size)
 
BOOL FASTCALL UserMarkObjectDestroy (PVOID Object)
 
BOOL FASTCALL UserDereferenceObject (PVOID Object)
 
BOOL FASTCALL UserFreeHandle (PUSER_HANDLE_TABLE ht, HANDLE handle)
 
BOOL FASTCALL UserObjectInDestroy (HANDLE h)
 
BOOL FASTCALL UserDeleteObject (HANDLE h, HANDLE_TYPE type)
 
VOID FASTCALL UserReferenceObject (PVOID obj)
 
PVOID FASTCALL UserReferenceObjectByHandle (HANDLE handle, HANDLE_TYPE type)
 
BOOLEAN UserDestroyObjectsForOwner (PUSER_HANDLE_TABLE Table, PVOID Owner)
 
BOOL APIENTRY NtUserValidateHandleSecure (HANDLE handle)
 
PVOID FASTCALL UserAssignmentLock (PVOID *ppvObj, PVOID pvNew)
 
PVOID FASTCALL UserAssignmentUnlock (PVOID *ppvObj)
 

Variables

PUSER_HANDLE_TABLE gHandleTable = NULL
 
struct {
   PVOID(*   ObjectAlloc )(PDESKTOP, PTHREADINFO,
      SIZE_T, PVOID *)
 
   BOOLEAN(*   ObjectDestroy )(PVOID)
 
   void(*   ObjectFree )(PVOID)
 
ObjectCallbacks [TYPE_CTYPES]
 

Function Documentation

◆ _Success_()

_Success_ ( return!  = NULL)

Definition at line 16 of file object.c.

22 {
23  PTHROBJHEAD ObjHead;
24 
26 
27  ASSERT(Size > sizeof(*ObjHead));
28  ASSERT(pti != NULL);
29 
30  ObjHead = UserHeapAlloc(Size);
31  if (!ObjHead)
32  return NULL;
33 
34  RtlZeroMemory(ObjHead, Size);
35 
36  ObjHead->pti = pti;
38  *HandleOwner = pti;
39  /* It's a thread object, but it still count as one for the process */
40  pti->ppi->UserHandleCount++;
41 
42  return ObjHead;
43 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
static __inline PVOID UserHeapAlloc(SIZE_T Bytes)
Definition: usrheap.h:34
#define IntReferenceThreadInfo(pti)
Definition: win32.h:166
#define ASSERT(a)
Definition: mode.c:44
struct _THREADINFO * pti
Definition: ntuser.h:188
#define NULL
Definition: types.h:112
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

◆ alloc_user_entry()

static __inline PUSER_HANDLE_ENTRY alloc_user_entry ( PUSER_HANDLE_TABLE  ht)
static

Definition at line 361 of file object.c.

362 {
364  TRACE("handles used %lu\n", gpsi->cHandleEntries);
365 
366  if (ht->freelist)
367  {
368  entry = ht->freelist;
369  ht->freelist = entry->ptr;
370 
371  gpsi->cHandleEntries++;
372  return entry;
373  }
374 
375  if (ht->nb_handles >= ht->allocated_handles) /* Need to grow the array */
376  {
377  ERR("Out of user handles! Used -> %lu, NM_Handle -> %d\n", gpsi->cHandleEntries, ht->nb_handles);
378 
379 #if DBG
381 #endif
382 
383  return NULL;
384 #if 0
385  PUSER_HANDLE_ENTRY new_handles;
386  /* Grow array by 50% (but at minimum 32 entries) */
387  int growth = max( 32, ht->allocated_handles / 2 );
388  int new_size = min( ht->allocated_handles + growth, (LAST_USER_HANDLE-FIRST_USER_HANDLE+1) >> 1 );
389  if (new_size <= ht->allocated_handles)
390  return NULL;
391  if (!(new_handles = UserHeapReAlloc( ht->handles, new_size * sizeof(*ht->handles) )))
392  return NULL;
393  ht->handles = new_handles;
394  ht->allocated_handles = new_size;
395 #endif
396  }
397 
398  entry = &ht->handles[ht->nb_handles++];
399 
400  entry->generation = 1;
401 
402  gpsi->cHandleEntries++;
403 
404  return entry;
405 }
ULONG_PTR cHandleEntries
Definition: ntuser.h:1047
#define max(a, b)
Definition: svc.c:63
PSERVERINFO gpsi
Definition: imm.c:18
#define FIRST_USER_HANDLE
Definition: ntuser.h:10
#define LAST_USER_HANDLE
Definition: ntuser.h:11
Definition: ntuser.h:16
static __inline PVOID UserHeapReAlloc(PVOID lpMem, SIZE_T Bytes)
Definition: usrheap.h:54
#define TRACE(s)
Definition: solgame.cpp:4
uint32_t entry
Definition: isohybrid.c:63
#define ERR(fmt,...)
Definition: debug.h:110
static const struct newhuff ht[]
Definition: huffman.h:296
#define min(a, b)
Definition: monoChain.cc:55
#define NULL
Definition: types.h:112
void DbgUserDumpHandleTable()

Referenced by UserAllocHandle().

◆ DBG_DEFAULT_CHANNEL()

DBG_DEFAULT_CHANNEL ( UserObj  )

◆ entry_to_handle()

static __inline HANDLE entry_to_handle ( PUSER_HANDLE_TABLE  ht,
PUSER_HANDLE_ENTRY  ptr 
)
static

Definition at line 355 of file object.c.

356 {
357  int index = ptr - ht->handles;
358  return (HANDLE)((((INT_PTR)index << 1) + FIRST_USER_HANDLE) + (ptr->generation << 16));
359 }
#define FIRST_USER_HANDLE
Definition: ntuser.h:10
int32_t INT_PTR
Definition: typedefs.h:64
static PVOID ptr
Definition: dispmode.c:27
GLuint index
Definition: glext.h:6031
static const struct newhuff ht[]
Definition: huffman.h:296

Referenced by get_user_full_handle(), get_user_object_handle(), and UserAllocHandle().

◆ free_user_entry()

static __inline void* free_user_entry ( PUSER_HANDLE_TABLE  ht,
PUSER_HANDLE_ENTRY  entry 
)
static

Definition at line 417 of file object.c.

418 {
419  void *ret;
420 
421 #if DBG
422  {
423  PPROCESSINFO ppi;
424  switch (entry->type)
425  {
426  case TYPE_WINDOW:
427  case TYPE_HOOK:
428  case TYPE_WINEVENTHOOK:
429  ppi = ((PTHREADINFO)entry->pi)->ppi;
430  break;
431  case TYPE_MENU:
432  case TYPE_CURSOR:
433  case TYPE_CALLPROC:
434  case TYPE_ACCELTABLE:
435  ppi = entry->pi;
436  break;
437  default:
438  ppi = NULL;
439  }
440  if (ppi)
441  ppi->DbgHandleCount[entry->type]--;
442  }
443 #endif
444 
445  ret = entry->ptr;
446  entry->ptr = ht->freelist;
447  entry->type = 0;
448  entry->flags = 0;
449  entry->pi = NULL;
450  ht->freelist = entry;
451 
452  gpsi->cHandleEntries--;
453 
454  return ret;
455 }
ULONG_PTR cHandleEntries
Definition: ntuser.h:1047
PSERVERINFO gpsi
Definition: imm.c:18
struct _THREADINFO * PTHREADINFO
Definition: ntwin32.h:6
int ret
uint32_t entry
Definition: isohybrid.c:63
static const struct newhuff ht[]
Definition: huffman.h:296
#define NULL
Definition: types.h:112

Referenced by UserDereferenceObject().

◆ FreeDeskProcObject()

static void FreeDeskProcObject ( _In_ PVOID  Object)
static

Definition at line 134 of file object.c.

136 {
138  PDESKTOP pDesk = ObjHead->rpdesk;
139  PPROCESSINFO ppi = (PPROCESSINFO)ObjHead->hTaskWow;
140 
141  ppi->UserHandleCount--;
143 
144  DesktopHeapFree(pDesk, Object);
145 }
struct _PROCESSINFO * PPROCESSINFO
Definition: ntwin32.h:5
struct _PROCDESKHEAD * PPROCDESKHEAD
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
DWORD_PTR hTaskWow
Definition: ntuser.h:218
static __inline BOOL DesktopHeapFree(IN PDESKTOP Desktop, IN PVOID lpMem)
Definition: desktop.h:215
struct _DESKTOP * rpdesk
Definition: ntuser.h:219
#define IntDereferenceProcessInfo(ppi)
Definition: win32.h:186

◆ FreeDeskThreadObject()

static void FreeDeskThreadObject ( _In_ PVOID  Object)
static

Definition at line 89 of file object.c.

91 {
92  PTHRDESKHEAD ObjHead = (PTHRDESKHEAD)Object;
93  PDESKTOP pDesk = ObjHead->rpdesk;
94  PTHREADINFO pti = ObjHead->pti;
95 
96  DesktopHeapFree(pDesk, Object);
97 
98  pti->ppi->UserHandleCount--;
100 }
struct _DESKTOP * rpdesk
Definition: ntuser.h:194
PPROCESSINFO ppi
Definition: win32.h:88
struct _THRDESKHEAD * PTHRDESKHEAD
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
static __inline BOOL DesktopHeapFree(IN PDESKTOP Desktop, IN PVOID lpMem)
Definition: desktop.h:215
#define IntDereferenceThreadInfo(pti)
Definition: win32.h:171

◆ FreeProcMarkObject()

void FreeProcMarkObject ( _In_ PVOID  Object)

Definition at line 175 of file object.c.

177 {
178  PPROCESSINFO ppi = ((PPROCMARKHEAD)Object)->ppi;
179 
181 
182  ppi->UserHandleCount--;
184 }
static __inline BOOL UserHeapFree(PVOID lpMem)
Definition: usrheap.h:44
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define IntDereferenceProcessInfo(ppi)
Definition: win32.h:186
struct _PROCMARKHEAD * PPROCMARKHEAD

Referenced by FreeCurIconObject().

◆ FreeSysObject()

static void FreeSysObject ( _In_ PVOID  Object)
static

Definition at line 237 of file object.c.

239 {
241 }
static __inline BOOL UserHeapFree(PVOID lpMem)
Definition: usrheap.h:44
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object

◆ FreeSysObjectCB()

static void FreeSysObjectCB ( _In_ PVOID  Object)
static

Definition at line 243 of file object.c.

245 {
247 }
#define USERTAG_CLIPBOARD
Definition: tags.h:200
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099

◆ FreeThreadObject()

static void FreeThreadObject ( _In_ PVOID  Object)
static

Definition at line 45 of file object.c.

47 {
48  PTHROBJHEAD ObjHead = (PTHROBJHEAD)Object;
49  PTHREADINFO pti = ObjHead->pti;
50 
51  UserHeapFree(ObjHead);
52 
53  pti->ppi->UserHandleCount--;
55 }
static __inline BOOL UserHeapFree(PVOID lpMem)
Definition: usrheap.h:44
PPROCESSINFO ppi
Definition: win32.h:88
struct _THROBJHEAD * PTHROBJHEAD
struct _THREADINFO * pti
Definition: ntuser.h:188
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define IntDereferenceThreadInfo(pti)
Definition: win32.h:171

◆ get_user_full_handle()

HANDLE get_user_full_handle ( PUSER_HANDLE_TABLE  ht,
HANDLE  handle 
)

Definition at line 511 of file object.c.

512 {
514 
515  if ((ULONG_PTR)handle >> 16)
516  return handle;
517  if (!(entry = handle_to_entry(ht, handle )))
518  return handle;
519  return entry_to_handle( ht, entry );
520 }
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:341
uint32_t ULONG_PTR
Definition: typedefs.h:65
namespace GUID const ADDRINFOEXW ADDRINFOEXW struct timeval OVERLAPPED LPLOOKUPSERVICE_COMPLETION_ROUTINE HANDLE * handle
Definition: sock.c:82
Definition: ntuser.h:16
static __inline HANDLE entry_to_handle(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY ptr)
Definition: object.c:355
uint32_t entry
Definition: isohybrid.c:63
static const struct newhuff ht[]
Definition: huffman.h:296

◆ get_user_object_handle()

void* get_user_object_handle ( PUSER_HANDLE_TABLE  ht,
HANDLE handle,
HANDLE_TYPE  type 
)

Definition at line 524 of file object.c.

525 {
527 
528  if (!(entry = handle_to_entry(ht, *handle )) || entry->type != type)
529  return NULL;
531  return entry->ptr;
532 }
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:341
Definition: ntuser.h:16
static __inline HANDLE entry_to_handle(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY ptr)
Definition: object.c:355
uint32_t entry
Definition: isohybrid.c:63
static const struct newhuff ht[]
Definition: huffman.h:296
#define NULL
Definition: types.h:112
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

◆ handle_to_entry()

PUSER_HANDLE_ENTRY handle_to_entry ( PUSER_HANDLE_TABLE  ht,
HANDLE  handle 
)

Definition at line 341 of file object.c.

342 {
343  unsigned short generation;
344  int index = (LOWORD(handle) - FIRST_USER_HANDLE) >> 1;
345  if (index < 0 || index >= ht->nb_handles)
346  return NULL;
347  if (!ht->handles[index].type)
348  return NULL;
350  if (generation == ht->handles[index].generation || !generation || generation == 0xffff)
351  return &ht->handles[index];
352  return NULL;
353 }
#define FIRST_USER_HANDLE
Definition: ntuser.h:10
GLuint index
Definition: glext.h:6031
#define index(s, c)
Definition: various.h:29
_In_ uint64_t _In_ uint64_t _In_ uint64_t generation
Definition: btrfs.c:2995
static const struct newhuff ht[]
Definition: huffman.h:296
#define NULL
Definition: types.h:112
#define HIWORD(l)
Definition: typedefs.h:247
#define LOWORD(l)
Definition: pedump.c:82

Referenced by get_user_full_handle(), get_user_object_handle(), NtUserValidateHandleSecure(), UserDereferenceObject(), UserFreeHandle(), UserGetObject(), UserGetObjectNoErr(), UserMarkObjectDestroy(), and UserObjectInDestroy().

◆ NtUserValidateHandleSecure()

BOOL APIENTRY NtUserValidateHandleSecure ( HANDLE  handle)

Definition at line 792 of file object.c.

794 {
795  UINT uType;
796  PPROCESSINFO ppi;
798 
801 
803  {
805  RETURN( FALSE);
806  }
807  uType = entry->type;
808  switch (uType)
809  {
810  case TYPE_WINDOW:
811  case TYPE_INPUTCONTEXT:
812  ppi = ((PTHREADINFO)entry->pi)->ppi;
813  break;
814  case TYPE_MENU:
815  case TYPE_ACCELTABLE:
816  case TYPE_CURSOR:
817  case TYPE_HOOK:
818  case TYPE_CALLPROC:
819  case TYPE_SETWINDOWPOS:
820  ppi = entry->pi;
821  break;
822  default:
823  ppi = NULL;
824  break;
825  }
826 
827  if (!ppi) RETURN( FALSE);
828 
829  // Same process job returns TRUE.
830  if (gptiCurrent->ppi->pW32Job == ppi->pW32Job) RETURN( TRUE);
831 
832  RETURN( FALSE);
833 
834 CLEANUP:
835  UserLeave();
836  END_CLEANUP;
837 }
#define CLEANUP
Definition: ntuser.h:5
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:341
#define TRUE
Definition: types.h:120
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define RETURN(x)
PPROCESSINFO ppi
Definition: win32.h:88
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
PTHREADINFO gptiCurrent
Definition: ntuser.c:15
VOID FASTCALL UserEnterExclusive(VOID)
Definition: ntuser.c:245
Definition: ntuser.h:16
struct _THREADINFO * PTHREADINFO
Definition: ntwin32.h:6
#define DECLARE_RETURN(type)
Definition: ntuser.h:3
uint32_t entry
Definition: isohybrid.c:63
PVOID pW32Job
Definition: win32.h:275
VOID FASTCALL UserLeave(VOID)
Definition: ntuser.c:254
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:28
#define END_CLEANUP
Definition: ntuser.h:6

Referenced by ValidateHandleNoErr().

◆ UserAllocHandle()

HANDLE UserAllocHandle ( _Inout_ PUSER_HANDLE_TABLE  ht,
_In_ PVOID  object,
_In_ HANDLE_TYPE  type,
_In_ PVOID  HandleOwner 
)

Definition at line 458 of file object.c.

463 {
465  if (!entry)
466  return 0;
467  entry->ptr = object;
468  entry->type = type;
469  entry->flags = 0;
470  entry->pi = HandleOwner;
471  if (++entry->generation >= 0xffff)
472  entry->generation = 1;
473 
474  /* We have created a handle, which is a reference! */
475  UserReferenceObject(object);
476 
477  return entry_to_handle(ht, entry );
478 }
coclass MSXML2::XSLTemplate40 object
static __inline PUSER_HANDLE_ENTRY alloc_user_entry(PUSER_HANDLE_TABLE ht)
Definition: object.c:361
Definition: ntuser.h:16
static __inline HANDLE entry_to_handle(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY ptr)
Definition: object.c:355
uint32_t entry
Definition: isohybrid.c:63
static const struct newhuff ht[]
Definition: huffman.h:296
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
VOID FASTCALL UserReferenceObject(PVOID obj)
Definition: object.c:731

Referenced by UserCreateObject().

◆ UserAssignmentLock()

PVOID FASTCALL UserAssignmentLock ( PVOID ppvObj,
PVOID  pvNew 
)

Definition at line 840 of file object.c.

841 {
842  PVOID pvOld = *ppvObj;
843  *ppvObj = pvNew;
844 
845  if (pvOld && pvOld == pvNew)
846  return pvOld;
847 
848  if (pvNew)
849  UserReferenceObject(pvNew);
850 
851  if (pvOld)
852  {
853  if (UserDereferenceObject(pvOld))
854  pvOld = NULL;
855  }
856 
857  return pvOld;
858 }
BOOL FASTCALL UserDereferenceObject(PVOID Object)
Definition: object.c:644
#define NULL
Definition: types.h:112
VOID FASTCALL UserReferenceObject(PVOID obj)
Definition: object.c:731

Referenced by co_UserActivateKbl(), co_UserActivateKeyboardLayout(), InitThreadCallback(), IntCreateWindow(), IntImmActivateLayout(), IntTranslateKbdMessage(), NtUserSetThreadLayoutHandles(), and UserCreateInputContext().

◆ UserAssignmentUnlock()

PVOID FASTCALL UserAssignmentUnlock ( PVOID ppvObj)

Definition at line 861 of file object.c.

862 {
863  PVOID pvOld = *ppvObj;
864  *ppvObj = NULL;
865 
866  if (pvOld)
867  {
868  if (UserDereferenceObject(pvOld))
869  pvOld = NULL;
870  }
871 
872  return pvOld;
873 }
BOOL FASTCALL UserDereferenceObject(PVOID Object)
Definition: object.c:644
#define NULL
Definition: types.h:112

Referenced by co_UserFreeWindow(), ExitThreadCallback(), and IntWinStaObjectDelete().

◆ UserCreateHandleTable()

BOOL FASTCALL UserCreateHandleTable ( VOID  )

Definition at line 536 of file object.c.

537 {
538  PVOID mem;
539  INT HandleCount = 1024 * 4;
540 
541  // FIXME: Don't alloc all at once! Must be mapped into umode also...
542  mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * HandleCount);
543  if (!mem)
544  {
545  ERR("Failed creating handle table\n");
546  return FALSE;
547  }
548 
550  if (gHandleTable == NULL)
551  {
552  UserHeapFree(mem);
553  ERR("Failed creating handle table\n");
554  return FALSE;
555  }
556 
557  // FIXME: Make auto growable
558  UserInitHandleTable(gHandleTable, mem, sizeof(USER_HANDLE_ENTRY) * HandleCount);
559 
560  return TRUE;
561 }
#define TRUE
Definition: types.h:120
static __inline BOOL UserHeapFree(PVOID lpMem)
Definition: usrheap.h:44
static __inline PVOID UserHeapAlloc(SIZE_T Bytes)
Definition: usrheap.h:34
int32_t INT
Definition: typedefs.h:58
#define FALSE
Definition: types.h:117
Definition: ntuser.h:16
#define ERR(fmt,...)
Definition: debug.h:110
#define NULL
Definition: types.h:112
VOID UserInitHandleTable(PUSER_HANDLE_TABLE ht, PVOID mem, ULONG bytes)
Definition: object.c:407
Definition: mem.c:156
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13

Referenced by InitUserImpl().

◆ UserCreateObject()

PVOID FASTCALL UserCreateObject ( PUSER_HANDLE_TABLE  ht,
PDESKTOP  pDesktop,
PTHREADINFO  pti,
HANDLE h,
HANDLE_TYPE  type,
ULONG  size 
)

Definition at line 568 of file object.c.

574 {
575  HANDLE hi;
576  PVOID Object;
577  PVOID ObjectOwner;
578 
579  /* Some sanity checks. Other checks will be made in the allocator */
581  ASSERT(type != TYPE_FREE);
582  ASSERT(ht != NULL);
583 
584  /* Allocate the object */
586  Object = ObjectCallbacks[type].ObjectAlloc(pDesktop, pti, size, &ObjectOwner);
587  if (!Object)
588  {
589  ERR("User object allocation failed. Out of memory!\n");
590  return NULL;
591  }
592 
593  hi = UserAllocHandle(ht, Object, type, ObjectOwner);
594  if (hi == NULL)
595  {
596  ERR("Out of user handles!\n");
597  ObjectCallbacks[type].ObjectFree(Object);
598  return NULL;
599  }
600 
601 #if DBG
602  if (pti)
603  pti->ppi->DbgHandleCount[type]++;
604 #endif
605 
606  /* Give this object its identity. */
607  ((PHEAD)Object)->h = hi;
608 
609  /* The caller will get a locked object.
610  * Note: with the reference from the handle, that makes two */
612 
613  if (h)
614  *h = hi;
615  return Object;
616 }
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
PPROCESSINFO ppi
Definition: win32.h:88
static const struct @4919 ObjectCallbacks[TYPE_CTYPES]
GLsizeiptr size
Definition: glext.h:5919
#define ASSERT(a)
Definition: mode.c:44
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define ERR(fmt,...)
Definition: debug.h:110
PVOID(* ObjectAlloc)(PDESKTOP, PTHREADINFO, SIZE_T, PVOID *)
Definition: object.c:251
static const struct newhuff ht[]
Definition: huffman.h:296
#define NULL
Definition: types.h:112
struct _HEAD * PHEAD
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
HANDLE UserAllocHandle(_Inout_ PUSER_HANDLE_TABLE ht, _In_ PVOID object, _In_ HANDLE_TYPE type, _In_ PVOID HandleOwner)
Definition: object.c:458
VOID FASTCALL UserReferenceObject(PVOID obj)
Definition: object.c:731

Referenced by CreateCallProc(), CreateTimer(), IntAddSynthesizedFormats(), IntCloneMenu(), IntCreateCurIconHandle(), IntCreateMenu(), IntCreateMonitorObject(), IntCreateWindow(), IntSynthesizeDib(), NtUserCallOneParam(), NtUserConvertMemHandle(), NtUserCreateAcceleratorTable(), NtUserSetWindowsHookEx(), NtUserSetWinEventHook(), UserCreateInputContext(), UserLoadKbdFile(), and UserLoadKbdLayout().

◆ UserDeleteObject()

BOOL FASTCALL UserDeleteObject ( HANDLE  h,
HANDLE_TYPE  type 
)

Definition at line 717 of file object.c.

718 {
720 
721  if (!body) return FALSE;
722 
723  ASSERT( ((PHEAD)body)->cLockObj >= 1);
724  ASSERT( ((PHEAD)body)->cLockObj < 0x10000);
725 
726  return UserFreeHandle(gHandleTable, h);
727 }
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define FALSE
Definition: types.h:117
Definition: ntuser.h:179
#define ASSERT(a)
Definition: mode.c:44
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:495
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
BOOL FASTCALL UserFreeHandle(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:686
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13

Referenced by co_UserFreeWindow(), DestroyCallProc(), IntDestroyCurIconObject(), IntDestroyInputContext(), IntDestroyMenuObject(), IntDestroyMonitorObject(), IntEndDeferWindowPosEx(), IntFreeElementData(), IntFreeHook(), IntRemoveEvent(), NtUserCallOneParam(), NtUserConvertMemHandle(), NtUserCreateAcceleratorTable(), RemoveTimer(), UnloadKbdFile(), UserDestroyAccelTable(), UserDestroyInputContext(), UserLoadKbdFile(), UserLoadKbdLayout(), and UserUnloadKbl().

◆ UserDereferenceObject()

BOOL FASTCALL UserDereferenceObject ( PVOID  Object)

Definition at line 644 of file object.c.

645 {
646  PHEAD ObjHead = Object;
647 
648  ASSERT(ObjHead->cLockObj >= 1);
649  ASSERT(ObjHead->cLockObj < 0x10000);
650 
651  if (--ObjHead->cLockObj == 0)
652  {
655 
656  entry = handle_to_entry(gHandleTable, ObjHead->h);
657 
658  ASSERT(entry != NULL);
659  /* The entry should be marked as in deletion */
661 
662  type = entry->type;
663  ASSERT(type != TYPE_FREE);
665 
666  /* We can now get rid of everything */
668 
669 #if 0
670  /* Call the object destructor */
671  ASSERT(ObjectCallbacks[type].ObjectCleanup != NULL);
672  ObjectCallbacks[type].ObjectCleanup(Object);
673 #endif
674 
675  /* And free it */
677  ObjectCallbacks[type].ObjectFree(Object);
678 
679  return TRUE;
680  }
681  return FALSE;
682 }
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:341
#define TRUE
Definition: types.h:120
static __inline void * free_user_entry(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY entry)
Definition: object.c:417
HANDLE h
Definition: ntuser.h:181
static const struct @4919 ObjectCallbacks[TYPE_CTYPES]
#define FALSE
Definition: types.h:117
void(* ObjectFree)(PVOID)
Definition: object.c:253
Definition: ntuser.h:179
Definition: ntuser.h:16
#define ASSERT(a)
Definition: mode.c:44
uint32_t entry
Definition: isohybrid.c:63
DWORD cLockObj
Definition: ntuser.h:182
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
enum _HANDLE_TYPE HANDLE_TYPE
#define NULL
Definition: types.h:112
#define HANDLEENTRY_INDESTROY
Definition: ntuser.h:14
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13

Referenced by _Success_(), co_UserCreateWindowEx(), co_UserFreeWindow(), co_UserSetParent(), co_WinPosSearchChildren(), CreateCallProc(), DefWndDoSizeMove(), DesktopWindowProc(), ExitThreadCallback(), FreeCurIconObject(), IntAddSynthesizedFormats(), IntCleanupCurIconCache(), IntCreateCurIconHandle(), IntCreateWindow(), IntDefWindowProc(), IntDestroyClass(), IntDestroyMonitorObject(), IntEndDeferWindowPosEx(), IntRemoveCursorFromList(), IntSetAconData(), IntSetOwner(), IntSynthesizeDib(), IntSystemSetCursor(), MENU_DrawBitmapItem(), MsqCleanupMessageQueue(), NtUserConvertMemHandle(), NtUserCreateAcceleratorTable(), NtUserDestroyCursor(), NtUserDrawIconEx(), NtUserGetCursorFrameInfo(), NtUserGetIconSize(), NtUserSetCursor(), NtUserSetWindowsHookEx(), NtUserSetWinEventHook(), NtUserUnhookWindowsHookEx(), RemoveTimer(), UserAssignmentLock(), UserAssignmentUnlock(), UserAttachThreadInput(), UserCreateInputContext(), UserCreateMenu(), UserDerefObjectCo(), UserDrawCaption(), UserDrawSysMenuButton(), UserFreeHandle(), UserLoadKbdFile(), UserLoadKbdLayout(), UserSetClassLongPtr(), and UserSetCursorIconData().

◆ UserDestroyObjectsForOwner()

BOOLEAN UserDestroyObjectsForOwner ( PUSER_HANDLE_TABLE  Table,
PVOID  Owner 
)

Definition at line 754 of file object.c.

755 {
756  int i;
758  BOOLEAN Ret = TRUE;
759 
760  /* Sweep the whole handle table */
761  for (i = 0; i < Table->allocated_handles; i++)
762  {
763  Entry = &Table->handles[i];
764 
765  if (Entry->pi != Owner)
766  continue;
767 
768  /* Do not destroy if it's already been done */
769  if (Entry->flags & HANDLEENTRY_INDESTROY)
770  continue;
771 
772  /* Call destructor */
773  if (!ObjectCallbacks[Entry->type].ObjectDestroy(Entry->ptr))
774  {
775  ERR("Failed destructing object %p, type %u.\n", Entry->ptr, Entry->type);
776  /* Don't return immediately, we must continue destroying the other objects */
777  Ret = FALSE;
778  }
779  }
780 
781  return Ret;
782 }
ASMGENDATA Table[]
Definition: genincdata.c:61
struct _Entry Entry
Definition: kefuncs.h:629
#define TRUE
Definition: types.h:120
static const struct @4919 ObjectCallbacks[TYPE_CTYPES]
#define FALSE
Definition: types.h:117
unsigned char BOOLEAN
Definition: ntuser.h:16
#define ERR(fmt,...)
Definition: debug.h:110
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
_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 HANDLEENTRY_INDESTROY
Definition: ntuser.h:14
base of all file and directory entries
Definition: entries.h:82

Referenced by ExitThreadCallback(), and UserProcessDestroy().

◆ UserFreeHandle()

BOOL FASTCALL UserFreeHandle ( PUSER_HANDLE_TABLE  ht,
HANDLE  handle 
)

Definition at line 686 of file object.c.

687 {
689 
690  if (!(entry = handle_to_entry( ht, handle )))
691  {
693  return FALSE;
694  }
695 
696  entry->flags = HANDLEENTRY_INDESTROY;
697 
698  return UserDereferenceObject(entry->ptr);
699 }
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:341
BOOL FASTCALL UserDereferenceObject(PVOID Object)
Definition: object.c:644
#define STATUS_INVALID_HANDLE
Definition: ntstatus.h:245
#define FALSE
Definition: types.h:117
Definition: ntuser.h:16
uint32_t entry
Definition: isohybrid.c:63
VOID FASTCALL SetLastNtError(NTSTATUS Status)
Definition: error.c:37
static const struct newhuff ht[]
Definition: huffman.h:296
#define HANDLEENTRY_INDESTROY
Definition: ntuser.h:14

Referenced by UserDeleteObject().

◆ UserGetObject()

PVOID UserGetObject ( PUSER_HANDLE_TABLE  ht,
HANDLE  handle,
HANDLE_TYPE  type 
)

Definition at line 495 of file object.c.

496 {
498 
499  ASSERT(ht);
500 
501  if (!(entry = handle_to_entry(ht, handle )) || entry->type != type)
502  {
504  return NULL;
505  }
506  return entry->ptr;
507 }
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:341
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
Definition: ntuser.h:16
#define ASSERT(a)
Definition: mode.c:44
uint32_t entry
Definition: isohybrid.c:63
static const struct newhuff ht[]
Definition: huffman.h:296
#define NULL
Definition: types.h:112
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:28

Referenced by co_HOOK_CallHooks(), IntCreateWindow(), IntDeferWindowPos(), IntEndDeferWindowPosEx(), IntGetHookObject(), IntImmProcessKey(), IntSetClassWndProc(), IntSetWindowProc(), IntSynthesizeBitmap(), NtUserCreateLocalMemHandle(), NtUserQueryInputContext(), NtUserUnhookWinEvent(), NtUserUpdateInputContext(), UserDeleteObject(), UserGetAccelObject(), UserGetCallProcInfo(), UserGetMenuObject(), UserGetMonitorObject(), UserGetWindowObject(), and UserReferenceObjectByHandle().

◆ UserGetObjectNoErr()

PVOID UserGetObjectNoErr ( PUSER_HANDLE_TABLE  ht,
HANDLE  handle,
HANDLE_TYPE  type 
)

Definition at line 481 of file object.c.

482 {
484 
485  ASSERT(ht);
486 
487  if (!(entry = handle_to_entry(ht, handle )) || entry->type != type)
488  {
489  return NULL;
490  }
491  return entry->ptr;
492 }
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:341
Definition: ntuser.h:16
#define ASSERT(a)
Definition: mode.c:44
uint32_t entry
Definition: isohybrid.c:63
static const struct newhuff ht[]
Definition: huffman.h:296
#define NULL
Definition: types.h:112
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545

Referenced by IntDestroyInputContext(), NC_IconForWindow(), NtUserAssociateInputContext(), NtUserDestroyInputContext(), NtUserSetCursor(), and ValidateHwndNoErr().

◆ UserInitHandleTable()

VOID UserInitHandleTable ( PUSER_HANDLE_TABLE  ht,
PVOID  mem,
ULONG  bytes 
)

Definition at line 407 of file object.c.

408 {
409  ht->freelist = NULL;
410  ht->handles = mem;
411 
412  ht->nb_handles = 0;
413  ht->allocated_handles = bytes / sizeof(USER_HANDLE_ENTRY);
414 }
static unsigned char bytes[4]
Definition: adnsresfilter.c:74
struct _USER_HANDLE_ENTRY USER_HANDLE_ENTRY
static const struct newhuff ht[]
Definition: huffman.h:296
#define NULL
Definition: types.h:112
Definition: mem.c:156

Referenced by UserCreateHandleTable().

◆ UserMarkObjectDestroy()

BOOL FASTCALL UserMarkObjectDestroy ( PVOID  Object)

Definition at line 621 of file object.c.

622 {
624  PHEAD ObjHead = Object;
625 
626  entry = handle_to_entry(gHandleTable, ObjHead->h);
627 
628  ASSERT(entry != NULL);
629 
630  entry->flags |= HANDLEENTRY_DESTROY;
631 
632  if (ObjHead->cLockObj > 1)
633  {
634  entry->flags &= ~HANDLEENTRY_INDESTROY;
635  TRACE("Count %d\n",ObjHead->cLockObj);
636  return FALSE;
637  }
638 
639  return TRUE;
640 }
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:341
#define TRUE
Definition: types.h:120
HANDLE h
Definition: ntuser.h:181
#define FALSE
Definition: types.h:117
Definition: ntuser.h:179
Definition: ntuser.h:16
#define TRACE(s)
Definition: solgame.cpp:4
#define ASSERT(a)
Definition: mode.c:44
uint32_t entry
Definition: isohybrid.c:63
DWORD cLockObj
Definition: ntuser.h:182
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define HANDLEENTRY_DESTROY
Definition: ntuser.h:13
#define NULL
Definition: types.h:112
#define HANDLEENTRY_INDESTROY
Definition: ntuser.h:14
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13

Referenced by co_IntUnloadKeyboardLayoutEx(), co_UserFreeWindow(), IntDestroyMenuObject(), and UserDestroyInputContext().

◆ UserObjectInDestroy()

BOOL FASTCALL UserObjectInDestroy ( HANDLE  h)

Definition at line 703 of file object.c.

704 {
706 
707  if (!(entry = handle_to_entry( gHandleTable, h )))
708  {
710  return TRUE;
711  }
712  return (entry->flags & HANDLEENTRY_INDESTROY);
713 }
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:341
#define TRUE
Definition: types.h:120
#define STATUS_INVALID_HANDLE
Definition: ntstatus.h:245
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
Definition: ntuser.h:16
uint32_t entry
Definition: isohybrid.c:63
VOID FASTCALL SetLastNtError(NTSTATUS Status)
Definition: error.c:37
#define HANDLEENTRY_INDESTROY
Definition: ntuser.h:14
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13

Referenced by co_CallHook(), IntDestroyClass(), IntSetMenuItemInfo(), NtUserSetCursor(), UserAttachThreadInput(), UserGetCurIconObject(), VerifyMenu(), and VerifyWnd().

◆ UserReferenceObject()

◆ UserReferenceObjectByHandle()

PVOID FASTCALL UserReferenceObjectByHandle ( HANDLE  handle,
HANDLE_TYPE  type 
)

Definition at line 741 of file object.c.

742 {
743  PVOID object;
744 
746  if (object)
747  {
748  UserReferenceObject(object);
749  }
750  return object;
751 }
coclass MSXML2::XSLTemplate40 object
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:495
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
VOID FASTCALL UserReferenceObject(PVOID obj)
Definition: object.c:731

Referenced by UserGetCurIconObject().

Variable Documentation

◆ gHandleTable

◆ ObjectAlloc

PVOID(* ObjectAlloc) (PDESKTOP, PTHREADINFO, SIZE_T, PVOID *)

Definition at line 251 of file object.c.

Referenced by UserCreateObject().

◆ ObjectCallbacks

const { ... } ObjectCallbacks[TYPE_CTYPES]
Initial value:
=
{
{ NULL, NULL, NULL },
{ AllocDeskThreadObject, co_UserDestroyWindow, FreeDeskThreadObject },
{ AllocDeskProcObject, UserDestroyMenuObject, FreeDeskProcObject },
{ AllocProcMarkObject, IntDestroyCurIconObject, FreeCurIconObject },
{ AllocSysObject, NULL, FreeSysObject },
{ AllocDeskThreadObject, IntRemoveHook, FreeDeskThreadObject },
{ AllocSysObjectCB, NULL,FreeSysObjectCB },
{ AllocDeskProcObject, DestroyCallProc, FreeDeskProcObject },
{ AllocProcMarkObject, UserDestroyAccelTable, FreeProcMarkObject },
{ NULL, NULL, NULL },
{ NULL, NULL, NULL },
{ NULL, NULL, NULL },
{ AllocSysObject, NULL, FreeSysObject },
{ AllocSysObject, NULL,FreeSysObject },
{ AllocSysObject, NULL, FreeSysObject },
{ AllocThreadObject, IntRemoveEvent, FreeThreadObject },
{ AllocSysObject, NULL, FreeSysObject },
{ NULL, NULL, NULL },
{ NULL, NULL, NULL },
{ NULL, NULL, NULL },
{ NULL, NULL, NULL },
}
BOOLEAN IntRemoveHook(PVOID Object)
Definition: hook.c:1037
BOOLEAN UserDestroyMenuObject(PVOID Object)
Definition: menu.c:313
BOOLEAN UserDestroyAccelTable(PVOID Object)
Definition: accelerator.c:328
BOOLEAN co_UserDestroyWindow(PVOID Object)
Definition: window.c:2845
BOOLEAN DestroyCallProc(_Inout_ PVOID Object)
Definition: callproc.c:22
VOID UserFreeInputContext(PVOID Object)
Definition: ime.c:1464
BOOLEAN UserDestroyInputContext(PVOID Object)
Definition: ime.c:1491
void FreeProcMarkObject(_In_ PVOID Object)
Definition: object.c:175
static void FreeDeskProcObject(_In_ PVOID Object)
Definition: object.c:134
BOOLEAN IntRemoveEvent(PVOID Object)
Definition: event.c:127
static void FreeDeskThreadObject(_In_ PVOID Object)
Definition: object.c:89
static void FreeSysObjectCB(_In_ PVOID Object)
Definition: object.c:243
static void FreeSysObject(_In_ PVOID Object)
Definition: object.c:237
PVOID AllocInputContextObject(PDESKTOP pDesk, PTHREADINFO pti, SIZE_T Size, PVOID *HandleOwner)
Definition: ime.c:1435
VOID FreeCurIconObject(_In_ PVOID Object)
Definition: cursoricon.c:332
BOOLEAN IntDestroyCurIconObject(_In_ PVOID Object)
Definition: cursoricon.c:313
static void FreeThreadObject(_In_ PVOID Object)
Definition: object.c:45
#define NULL
Definition: types.h:112

Referenced by UserCreateObject(), UserDereferenceObject(), and UserDestroyObjectsForOwner().

◆ ObjectDestroy

BOOLEAN(* ObjectDestroy) (PVOID)

Definition at line 252 of file object.c.

◆ ObjectFree

void(* ObjectFree) (PVOID)

Definition at line 253 of file object.c.

Referenced by UserDereferenceObject().