ReactOS  0.4.14-dev-49-gfb4591c
object.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _USER_REFERENCE_ENTRY
 

Typedefs

typedef struct _USER_REFERENCE_ENTRY USER_REFERENCE_ENTRY
 
typedef struct _USER_REFERENCE_ENTRYPUSER_REFERENCE_ENTRY
 

Functions

VOID FASTCALL UserReferenceObject (PVOID obj)
 
PVOID FASTCALL UserReferenceObjectByHandle (HANDLE handle, HANDLE_TYPE type)
 
BOOL FASTCALL UserDereferenceObject (PVOID obj)
 
PVOID FASTCALL UserCreateObject (PUSER_HANDLE_TABLE ht, struct _DESKTOP *pDesktop, PTHREADINFO pti, HANDLE *h, HANDLE_TYPE type, ULONG size)
 
BOOL FASTCALL UserDeleteObject (HANDLE h, HANDLE_TYPE type)
 
PVOID UserGetObject (PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
 
PVOID UserGetObjectNoErr (PUSER_HANDLE_TABLE, HANDLE, HANDLE_TYPE)
 
BOOL FASTCALL UserCreateHandleTable (VOID)
 
BOOL FASTCALL UserObjectInDestroy (HANDLE)
 
void DbgUserDumpHandleTable ()
 
PVOID FASTCALL ValidateHandle (HANDLE handle, HANDLE_TYPE type)
 
BOOLEAN UserDestroyObjectsForOwner (PUSER_HANDLE_TABLE Table, PVOID Owner)
 
BOOL FASTCALL UserMarkObjectDestroy (PVOID)
 
static __inline VOID UserRefObjectCo (PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
 
static __inline VOID UserDerefObjectCo (PVOID obj)
 
void FreeProcMarkObject (_In_ PVOID Object)
 

Variables

PUSER_HANDLE_TABLE gHandleTable
 

Typedef Documentation

◆ PUSER_REFERENCE_ENTRY

◆ USER_REFERENCE_ENTRY

Function Documentation

◆ DbgUserDumpHandleTable()

void DbgUserDumpHandleTable ( )

◆ 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:42
static IUnknown Object
Definition: main.c:512
#define IntDereferenceProcessInfo(ppi)
Definition: win32.h:182
struct _PROCMARKHEAD * PPROCMARKHEAD

Referenced by FreeCurIconObject().

◆ UserCreateHandleTable()

BOOL FASTCALL UserCreateHandleTable ( VOID  )

Definition at line 503 of file object.c.

504 {
505  PVOID mem;
506  INT HandleCount = 1024 * 4;
507 
508  // FIXME: Don't alloc all at once! Must be mapped into umode also...
509  mem = UserHeapAlloc(sizeof(USER_HANDLE_ENTRY) * HandleCount);
510  if (!mem)
511  {
512  ERR("Failed creating handle table\n");
513  return FALSE;
514  }
515 
517  if (gHandleTable == NULL)
518  {
519  UserHeapFree(mem);
520  ERR("Failed creating handle table\n");
521  return FALSE;
522  }
523 
524  // FIXME: Make auto growable
525  UserInitHandleTable(gHandleTable, mem, sizeof(USER_HANDLE_ENTRY) * HandleCount);
526 
527  return TRUE;
528 }
#define TRUE
Definition: types.h:120
static __inline BOOL UserHeapFree(PVOID lpMem)
Definition: usrheap.h:42
static __inline PVOID UserHeapAlloc(SIZE_T Bytes)
Definition: usrheap.h:34
int32_t INT
Definition: typedefs.h:56
smooth NULL
Definition: ftsmooth.c:416
Definition: ntuser.h:19
#define ERR(fmt,...)
Definition: debug.h:109
VOID UserInitHandleTable(PUSER_HANDLE_TABLE ht, PVOID mem, ULONG bytes)
Definition: object.c:374
Definition: mem.c:156
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13

Referenced by InitUserImpl().

◆ UserCreateObject()

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

◆ UserDeleteObject()

BOOL FASTCALL UserDeleteObject ( HANDLE  h,
HANDLE_TYPE  type 
)

Definition at line 683 of file object.c.

684 {
686 
687  if (!body) return FALSE;
688 
689  ASSERT( ((PHEAD)body)->cLockObj >= 1);
690  ASSERT( ((PHEAD)body)->cLockObj < 0x10000);
691 
692  return UserFreeHandle(gHandleTable, h);
693 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
Definition: ntuser.h:174
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:462
static const void * body(MD5_CTX *ctx, const void *data, unsigned long size)
Definition: md5.c:100
BOOL FASTCALL UserFreeHandle(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:652
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13

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

◆ UserDereferenceObject()

BOOL FASTCALL UserDereferenceObject ( PVOID  obj)

Definition at line 610 of file object.c.

611 {
612  PHEAD ObjHead = Object;
613 
614  ASSERT(ObjHead->cLockObj >= 1);
615  ASSERT(ObjHead->cLockObj < 0x10000);
616 
617  if (--ObjHead->cLockObj == 0)
618  {
621 
622  entry = handle_to_entry(gHandleTable, ObjHead->h);
623 
624  ASSERT(entry != NULL);
625  /* The entry should be marked as in deletion */
627 
628  type = entry->type;
629  ASSERT(type != TYPE_FREE);
631 
632  /* We can now get rid of everything */
634 
635 #if 0
636  /* Call the object destructor */
637  ASSERT(ObjectCallbacks[type].ObjectCleanup != NULL);
638  ObjectCallbacks[type].ObjectCleanup(Object);
639 #endif
640 
641  /* And free it */
643  ObjectCallbacks[type].ObjectFree(Object);
644 
645  return TRUE;
646  }
647  return FALSE;
648 }
#define TRUE
Definition: types.h:120
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:308
static __inline void * free_user_entry(PUSER_HANDLE_TABLE ht, PUSER_HANDLE_ENTRY entry)
Definition: object.c:384
HANDLE h
Definition: ntuser.h:176
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
void(* ObjectFree)(PVOID)
Definition: object.c:220
smooth NULL
Definition: ftsmooth.c:416
static const struct @4136 ObjectCallbacks[TYPE_CTYPES]
Definition: ntuser.h:174
Definition: ntuser.h:19
static IUnknown Object
Definition: main.c:512
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
uint32_t entry
Definition: isohybrid.c:63
DWORD cLockObj
Definition: ntuser.h:177
enum _HANDLE_TYPE HANDLE_TYPE
#define HANDLEENTRY_INDESTROY
Definition: ntuser.h:17
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13

Referenced by _Success_(), co_UserActivateKbl(), 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(), UserAttachThreadInput(), UserCreateMenu(), UserDerefObjectCo(), UserDrawCaption(), UserDrawSysMenuButton(), UserFreeHandle(), UserLoadKbdFile(), UserLoadKbdLayout(), UserSetClassLongPtr(), and UserSetCursorIconData().

◆ UserDerefObjectCo()

static __inline VOID UserDerefObjectCo ( PVOID  obj)
static

Definition at line 38 of file object.h.

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 }
Definition: ntbasedef.h:635
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
#define UNREFERENCED_LOCAL_VARIABLE(L)
Definition: ntbasedef.h:324
PVOID obj
Definition: object.h:6
Definition: object.h:3
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
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
BOOL FASTCALL UserDereferenceObject(PVOID obj)
Definition: object.c:610
SINGLE_LIST_ENTRY ReferencesList
Definition: win32.h:151
base of all file and directory entries
Definition: entries.h:82

Referenced by ActivateOtherWindowMin(), co_HOOK_CallHooks(), co_IntPaintWindows(), co_IntProcessKeyboardMessage(), co_IntSendActivateMessages(), co_IntSendDeactivateMessages(), co_IntSendMessageTimeoutSingle(), co_IntSendMessageWithCallBack(), co_IntUpdateWindows(), co_UserCreateWindowEx(), co_UserDestroyWindow(), co_UserGetUpdateRect(), co_UserGetUpdateRgn(), co_UserSetParent(), co_VIS_WindowLayoutChanged(), co_WinPosActivateOtherWindow(), co_WinPosArrangeIconicWindows(), co_WinPosWindowFromPoint(), DefWndHandleSetCursor(), DefWndHandleSysCommand(), IntActivateWindow(), IntDeactivateWindow(), IntDefWindowProc(), IntEndDeferWindowPosEx(), IntNotifyWinEvent(), IntScrollWindowEx(), IntSendChildNCPaint(), IntSendParentNotify(), MENU_EnsureMenuItemVisible(), MENU_ShowPopup(), NtGdiUpdateColors(), NtUserBeginPaint(), NtUserCallHwndLock(), NtUserCallHwndParam(), NtUserCallHwndParamLock(), NtUserDestroyWindow(), NtUserEnableScrollBar(), NtUserEndPaint(), NtUserFillWindow(), NtUserGetMenuBarInfo(), NtUserGetScrollBarInfo(), NtUserHideCaret(), NtUserMessageCall(), NtUserNotifyWinEvent(), NtUserRedrawWindow(), NtUserSBGetParms(), NtUserScrollWindowEx(), NtUserSetActiveWindow(), NtUserSetFocus(), NtUserSetInternalWindowPos(), NtUserSetMenu(), NtUserSetScrollBarInfo(), NtUserSetScrollInfo(), NtUserSetShellWindowEx(), NtUserSetWindowPlacement(), NtUserSetWindowPos(), NtUserShowCaret(), NtUserShowScrollBar(), NtUserShowWindow(), NtUserShowWindowAsync(), NtUserTrackPopupMenuEx(), NtUserTranslateAccelerator(), NtUserWindowFromPoint(), SpiNotifyNCMetricsChanged(), and WinPosDoOwnedPopups().

◆ UserDestroyObjectsForOwner()

BOOLEAN UserDestroyObjectsForOwner ( PUSER_HANDLE_TABLE  Table,
PVOID  Owner 
)

Definition at line 720 of file object.c.

721 {
722  int i;
724  BOOLEAN Ret = TRUE;
725 
726  /* Sweep the whole handle table */
727  for (i = 0; i < Table->allocated_handles; i++)
728  {
729  Entry = &Table->handles[i];
730 
731  if (Entry->pi != Owner)
732  continue;
733 
734  /* Do not destroy if it's already been done */
735  if (Entry->flags & HANDLEENTRY_INDESTROY)
736  continue;
737 
738  /* Call destructor */
739  if (!ObjectCallbacks[Entry->type].ObjectDestroy(Entry->ptr))
740  {
741  ERR("Failed destructing object %p, type %u.\n", Entry->ptr, Entry->type);
742  /* Don't return immediately, we must continue destroying the other objects */
743  Ret = FALSE;
744  }
745  }
746 
747  return Ret;
748 }
ASMGENDATA Table[]
Definition: genincdata.c:61
#define TRUE
Definition: types.h:120
struct _Entry Entry
Definition: kefuncs.h:640
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
unsigned char BOOLEAN
static const struct @4136 ObjectCallbacks[TYPE_CTYPES]
Definition: ntuser.h:19
#define ERR(fmt,...)
Definition: debug.h:109
_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
#define HANDLEENTRY_INDESTROY
Definition: ntuser.h:17
base of all file and directory entries
Definition: entries.h:82

Referenced by ExitThreadCallback(), and UserProcessDestroy().

◆ UserGetObject()

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

Definition at line 462 of file object.c.

463 {
465 
466  ASSERT(ht);
467 
468  if (!(entry = handle_to_entry(ht, handle )) || entry->type != type)
469  {
471  return NULL;
472  }
473  return entry->ptr;
474 }
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:308
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
smooth NULL
Definition: ftsmooth.c:416
Definition: ntuser.h:19
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
uint32_t entry
Definition: isohybrid.c:63
static const struct newhuff ht[]
Definition: huffman.h:296
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27

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

◆ UserGetObjectNoErr()

PVOID UserGetObjectNoErr ( PUSER_HANDLE_TABLE  ,
HANDLE  ,
HANDLE_TYPE   
)

Definition at line 448 of file object.c.

449 {
451 
452  ASSERT(ht);
453 
454  if (!(entry = handle_to_entry(ht, handle )) || entry->type != type)
455  {
456  return NULL;
457  }
458  return entry->ptr;
459 }
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:308
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
smooth NULL
Definition: ftsmooth.c:416
Definition: ntuser.h:19
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
uint32_t entry
Definition: isohybrid.c:63
static const struct newhuff ht[]
Definition: huffman.h:296

Referenced by NC_IconForWindow(), NtUserSetCursor(), and ValidateHwndNoErr().

◆ UserMarkObjectDestroy()

BOOL FASTCALL UserMarkObjectDestroy ( PVOID  )

Definition at line 587 of file object.c.

588 {
590  PHEAD ObjHead = Object;
591 
592  entry = handle_to_entry(gHandleTable, ObjHead->h);
593 
594  ASSERT(entry != NULL);
595 
596  entry->flags |= HANDLEENTRY_DESTROY;
597 
598  if (ObjHead->cLockObj > 1)
599  {
600  entry->flags &= ~HANDLEENTRY_INDESTROY;
601  TRACE("Count %d\n",ObjHead->cLockObj);
602  return FALSE;
603  }
604 
605  return TRUE;
606 }
#define TRUE
Definition: types.h:120
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:308
HANDLE h
Definition: ntuser.h:176
smooth NULL
Definition: ftsmooth.c:416
Definition: ntuser.h:174
Definition: ntuser.h:19
#define TRACE(s)
Definition: solgame.cpp:4
static IUnknown Object
Definition: main.c:512
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
uint32_t entry
Definition: isohybrid.c:63
DWORD cLockObj
Definition: ntuser.h:177
#define HANDLEENTRY_DESTROY
Definition: ntuser.h:16
#define HANDLEENTRY_INDESTROY
Definition: ntuser.h:17
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13

Referenced by co_UserFreeWindow(), and IntDestroyMenuObject().

◆ UserObjectInDestroy()

BOOL FASTCALL UserObjectInDestroy ( HANDLE  )

Definition at line 669 of file object.c.

670 {
672 
673  if (!(entry = handle_to_entry( gHandleTable, h )))
674  {
676  return TRUE;
677  }
678  return (entry->flags & HANDLEENTRY_INDESTROY);
679 }
#define TRUE
Definition: types.h:120
PUSER_HANDLE_ENTRY handle_to_entry(PUSER_HANDLE_TABLE ht, HANDLE handle)
Definition: object.c:308
#define STATUS_INVALID_HANDLE
Definition: ntstatus.h:231
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
Definition: ntuser.h:19
uint32_t entry
Definition: isohybrid.c:63
VOID FASTCALL SetLastNtError(NTSTATUS Status)
Definition: error.c:36
#define HANDLEENTRY_INDESTROY
Definition: ntuser.h:17
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 707 of file object.c.

708 {
709  PVOID object;
710 
712  if (object)
713  {
714  UserReferenceObject(object);
715  }
716  return object;
717 }
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:462
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
void * object
Definition: jmemsys.h:48
VOID FASTCALL UserReferenceObject(PVOID obj)
Definition: object.c:697

Referenced by UserGetCurIconObject().

◆ UserRefObjectCo()

static __inline VOID UserRefObjectCo ( PVOID  obj,
PUSER_REFERENCE_ENTRY  UserReferenceEntry 
)
static

Definition at line 25 of file object.h.

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 }
PVOID NTAPI PsGetCurrentThreadWin32Thread(VOID)
Definition: thread.c:805
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
PVOID obj
Definition: object.h:6
smooth NULL
Definition: ftsmooth.c:416
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
SINGLE_LIST_ENTRY Entry
Definition: object.h:5
SINGLE_LIST_ENTRY ReferencesList
Definition: win32.h:151
VOID FASTCALL UserReferenceObject(PVOID obj)
Definition: object.c:697

Referenced by ActivateOtherWindowMin(), co_HOOK_CallHooks(), co_IntPaintWindows(), co_IntProcessKeyboardMessage(), co_IntSendActivateMessages(), co_IntSendDeactivateMessages(), co_IntSendMessageTimeoutSingle(), co_IntSendMessageWithCallBack(), co_IntUpdateWindows(), co_UserCreateWindowEx(), co_UserDestroyWindow(), co_UserGetUpdateRect(), co_UserGetUpdateRgn(), co_UserSetParent(), co_VIS_WindowLayoutChanged(), co_WinPosActivateOtherWindow(), co_WinPosArrangeIconicWindows(), co_WinPosWindowFromPoint(), DefWndHandleSetCursor(), DefWndHandleSysCommand(), IntActivateWindow(), IntDeactivateWindow(), IntDefWindowProc(), IntEndDeferWindowPosEx(), IntNotifyWinEvent(), IntScrollWindowEx(), IntSendChildNCPaint(), IntSendParentNotify(), MENU_EnsureMenuItemVisible(), MENU_ShowPopup(), NtGdiUpdateColors(), NtUserBeginPaint(), NtUserCallHwndLock(), NtUserCallHwndParam(), NtUserCallHwndParamLock(), NtUserDestroyWindow(), NtUserEnableScrollBar(), NtUserEndPaint(), NtUserFillWindow(), NtUserGetMenuBarInfo(), NtUserGetScrollBarInfo(), NtUserHideCaret(), NtUserMessageCall(), NtUserNotifyWinEvent(), NtUserRedrawWindow(), NtUserSBGetParms(), NtUserScrollWindowEx(), NtUserSetActiveWindow(), NtUserSetFocus(), NtUserSetInternalWindowPos(), NtUserSetMenu(), NtUserSetScrollBarInfo(), NtUserSetScrollInfo(), NtUserSetShellWindowEx(), NtUserSetWindowPlacement(), NtUserSetWindowPos(), NtUserShowCaret(), NtUserShowScrollBar(), NtUserShowWindow(), NtUserShowWindowAsync(), NtUserTrackPopupMenuEx(), NtUserTranslateAccelerator(), NtUserWindowFromPoint(), SpiNotifyNCMetricsChanged(), and WinPosDoOwnedPopups().

◆ ValidateHandle()

PVOID FASTCALL ValidateHandle ( HANDLE  handle,
HANDLE_TYPE  type 
)

Variable Documentation

◆ gHandleTable

PUSER_HANDLE_TABLE gHandleTable

Definition at line 13 of file object.c.