Skip to content

Commit

Permalink
[NTUSER] Add UserHMSetHandle macro
Browse files Browse the repository at this point in the history
  • Loading branch information
TAN-Gaming committed Dec 14, 2023
1 parent e4d03f4 commit 94ba929
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions win32ss/include/ntuser.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ typedef struct _PROCMARKHEAD
} PROCMARKHEAD, *PPROCMARKHEAD;

#define UserHMGetHandle(obj) ((obj)->head.h)
#define UserHMSetHandle(obj, handle) (obj)->head.h = (handle)

/* Window Client Information structure */
struct _ETHREAD;
Expand Down
2 changes: 1 addition & 1 deletion win32ss/user/ntuser/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ NtUserSetWinEventHook(
InsertTailList(&GlobalEvents->Events, &pEH->Chain);
GlobalEvents->Counts++;

UserHMGetHandle(pEH) = Handle;
UserHMSetHandle(pEH, Handle);
pEH->eventMin = eventMin;
pEH->eventMax = eventMax;
pEH->idProcess = idProcess; // These are cmp'ed
Expand Down
2 changes: 1 addition & 1 deletion win32ss/user/ntuser/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ CreateTimer(VOID)
Ret = UserCreateObject(gHandleTable, NULL, NULL, &Handle, TYPE_TIMER, sizeof(TIMER));
if (Ret)
{
Ret->head.h = Handle;
UserHMSetHandle(Ret, Handle);
InsertTailList(&TimersListHead, &Ret->ptmrList);
}

Expand Down

0 comments on commit 94ba929

Please sign in to comment.