Author: tkreuzer
Date: Sat Dec 29 19:14:30 2012
New Revision: 58041
URL:
http://svn.reactos.org/svn/reactos?rev=58041&view=rev
Log:
[WIN32K]
Use the official HANDLE_TYPE enum instead of the custom USER_OBJECT_TYPE
Modified:
trunk/reactos/win32ss/drivers/videoprt/child.c
trunk/reactos/win32ss/gdi/ntgdi/cliprgn.h
trunk/reactos/win32ss/include/ntuser.h
trunk/reactos/win32ss/user/ntuser/accelerator.c
trunk/reactos/win32ss/user/ntuser/callproc.c
trunk/reactos/win32ss/user/ntuser/class.c
trunk/reactos/win32ss/user/ntuser/clipboard.c
trunk/reactos/win32ss/user/ntuser/cursoricon.c
trunk/reactos/win32ss/user/ntuser/cursoricon_new.c
trunk/reactos/win32ss/user/ntuser/event.c
trunk/reactos/win32ss/user/ntuser/hook.c
trunk/reactos/win32ss/user/ntuser/kbdlayout.c
trunk/reactos/win32ss/user/ntuser/menu.c
trunk/reactos/win32ss/user/ntuser/monitor.c
trunk/reactos/win32ss/user/ntuser/object.c
trunk/reactos/win32ss/user/ntuser/object.h
trunk/reactos/win32ss/user/ntuser/painting.c
trunk/reactos/win32ss/user/ntuser/simplecall.c
trunk/reactos/win32ss/user/ntuser/timer.c
trunk/reactos/win32ss/user/ntuser/win32.h
trunk/reactos/win32ss/user/ntuser/window.c
trunk/reactos/win32ss/user/ntuser/winpos.c
trunk/reactos/win32ss/user/user32/include/user_x.h
trunk/reactos/win32ss/user/user32/misc/misc.c
trunk/reactos/win32ss/user/user32/windows/menu.c
Modified: trunk/reactos/win32ss/drivers/videoprt/child.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/c…
==============================================================================
--- trunk/reactos/win32ss/drivers/videoprt/child.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/drivers/videoprt/child.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -393,4 +393,4 @@
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return Status;
-}
+}
Modified: trunk/reactos/win32ss/gdi/ntgdi/cliprgn.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/cliprgn.…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/cliprgn.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/cliprgn.h [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -3,4 +3,4 @@
INT FASTCALL GdiGetClipBox(HDC hDC, RECTL *rc);
INT FASTCALL GdiSelectVisRgn(HDC hdc, HRGN hrgn);
INT FASTCALL GdiExtSelectClipRgn (PDC dc, HRGN hrgn, int fnMode);
-int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc);
+int FASTCALL CLIPPING_UpdateGCRegion(DC* Dc);
Modified: trunk/reactos/win32ss/include/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?r…
==============================================================================
--- trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/include/ntuser.h [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -33,32 +33,33 @@
int allocated_handles;
} USER_HANDLE_TABLE, * PUSER_HANDLE_TABLE;
-typedef enum _USER_OBJECT_TYPE
-{
- otFree = 0,
- otWindow,
- otMenu,
- otCursorIcon,
- otSMWP,
- otHook,
- otClipBoardData,
- otCallProc,
- otAccel,
- otDDEaccess,
- otDDEconv,
- otDDExact,
- otMonitor,
- otKBDlayout,
- otKBDfile,
- otEvent,
- otTimer,
- otInputContext,
- otHidData,
- otDeviceInfo,
- otTouchInput,
- otGestureInfo,
- USER_HANDLE_TYPE_COUNT
-} USER_OBJECT_TYPE;
+typedef enum _HANDLE_TYPE
+{
+ TYPE_FREE = 0,
+ TYPE_WINDOW = 1,
+ TYPE_MENU = 2,
+ TYPE_CURSOR = 3,
+ TYPE_SETWINDOWPOS = 4,
+ TYPE_HOOK = 5,
+ TYPE_CLIPDATA = 6,
+ TYPE_CALLPROC = 7,
+ TYPE_ACCELTABLE = 8,
+ TYPE_DDEACCESS = 9,
+ TYPE_DDECONV = 10,
+ TYPE_DDEXACT = 11,
+ TYPE_MONITOR = 12,
+ TYPE_KBDLAYOUT = 13,
+ TYPE_KBDFILE = 14,
+ TYPE_WINEVENTHOOK = 15,
+ TYPE_TIMER = 16,
+ TYPE_INPUTCONTEXT = 17,
+ TYPE_HIDDATA = 18,
+ TYPE_DEVICEINFO = 19,
+ TYPE_TOUCHINPUTINFO = 20,
+ TYPE_GESTUREINFOOBJ = 21,
+ TYPE_CTYPES,
+ TYPE_GENERIC = 255
+} HANDLE_TYPE, *PHANDLE_TYPE;
typedef enum _USERTHREADINFOCLASS
{
Modified: trunk/reactos/win32ss/user/ntuser/accelerator.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/accele…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/accelerator.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/accelerator.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -28,7 +28,7 @@
return NULL;
}
- Accel = UserGetObject(gHandleTable, hAccel, otAccel);
+ Accel = UserGetObject(gHandleTable, hAccel, TYPE_ACCELTABLE);
if (!Accel)
{
EngSetLastError(ERROR_INVALID_ACCEL_HANDLE);
@@ -257,7 +257,7 @@
RETURN( (HACCEL) NULL );
}
- Accel = UserCreateObject(gHandleTable, NULL, NULL, (PHANDLE)&hAccel, otAccel,
sizeof(ACCELERATOR_TABLE));
+ Accel = UserCreateObject(gHandleTable, NULL, NULL, (PHANDLE)&hAccel,
TYPE_ACCELTABLE, sizeof(ACCELERATOR_TABLE));
if (Accel == NULL)
{
@@ -270,7 +270,7 @@
if (Accel->Table == NULL)
{
UserDereferenceObject(Accel);
- UserDeleteObject(hAccel, otAccel);
+ UserDeleteObject(hAccel, TYPE_ACCELTABLE);
SetLastNtError(STATUS_NO_MEMORY);
RETURN( (HACCEL) NULL);
}
@@ -308,7 +308,7 @@
{
ExFreePoolWithTag(Accel->Table, USERTAG_ACCEL);
UserDereferenceObject(Accel);
- UserDeleteObject(hAccel, otAccel);
+ UserDeleteObject(hAccel, TYPE_ACCELTABLE);
SetLastNtError(Status);
RETURN( (HACCEL) NULL);
}
@@ -351,7 +351,7 @@
Accel->Table = NULL;
}
- UserDeleteObject(hAccel, otAccel);
+ UserDeleteObject(hAccel, TYPE_ACCELTABLE);
RETURN( TRUE);
Modified: trunk/reactos/win32ss/user/ntuser/callproc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/callpr…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/callproc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/callproc.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -21,7 +21,7 @@
DestroyCallProc(IN PDESKTOPINFO Desktop,
IN OUT PCALLPROCDATA CallProc)
{
- UserDeleteObject(UserHMGetHandle(CallProc), otCallProc);
+ UserDeleteObject(UserHMGetHandle(CallProc), TYPE_CALLPROC);
}
PCALLPROCDATA
@@ -37,7 +37,7 @@
Desktop,
NULL,
&Handle,
- otCallProc,
+ TYPE_CALLPROC,
sizeof(CALLPROCDATA));
if (NewCallProc != NULL)
{
@@ -60,7 +60,7 @@
CallProc = UserGetObject(gHandleTable,
hCallProc,
- otCallProc);
+ TYPE_CALLPROC);
if (CallProc == NULL)
{
return FALSE;
Modified: trunk/reactos/win32ss/user/ntuser/class.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/class.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -462,7 +462,7 @@
// Check if CallProc handle and retrieve previous call proc address and set.
if (IsCallProcHandle(WndProc))
{
- pcpd = UserGetObject(gHandleTable, WndProc, otCallProc);
+ pcpd = UserGetObject(gHandleTable, WndProc, TYPE_CALLPROC);
if (pcpd) chWndProc = pcpd->pfnClientPrevious;
}
Modified: trunk/reactos/win32ss/user/ntuser/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/clipbo…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/clipboard.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -58,7 +58,7 @@
!IS_DATA_SYNTHESIZED(pElement))
{
if (pElement->fGlobalHandle)
- UserDeleteObject(pElement->hData, otClipBoardData);
+ UserDeleteObject(pElement->hData, TYPE_CLIPDATA);
else if (pElement->fmt == CF_BITMAP || pElement->fmt == CF_PALETTE ||
pElement->fmt == CF_DSPBITMAP)
{
@@ -184,7 +184,7 @@
NULL,
NULL,
&hMem,
- otClipBoardData,
+ TYPE_CLIPDATA,
cjDataSize);
if (!pClipboardData)
{
@@ -235,7 +235,7 @@
if(!pDibEl->fGlobalHandle)
return;
- pMemObj = (PCLIPBOARDDATA)UserGetObject(gHandleTable, pDibEl->hData,
otClipBoardData);
+ pMemObj = (PCLIPBOARDDATA)UserGetObject(gHandleTable, pDibEl->hData,
TYPE_CLIPDATA);
if (!pMemObj)
return;
@@ -297,7 +297,7 @@
PCLIPBOARDDATA pMemObj;
HANDLE hMem;
- pMemObj = (PCLIPBOARDDATA)UserCreateObject(gHandleTable, NULL, NULL, &hMem,
otClipBoardData,
+ pMemObj = (PCLIPBOARDDATA)UserCreateObject(gHandleTable, NULL, NULL, &hMem,
TYPE_CLIPDATA,
sizeof(CLIPBOARDDATA) +
sizeof(LCID));
if (pMemObj)
{
@@ -1087,7 +1087,7 @@
UserEnterExclusive();
/* Create Clipboard data object */
- pMemObj = UserCreateObject(gHandleTable, NULL, NULL, &hMem, otClipBoardData,
sizeof(CLIPBOARDDATA) + cbData);
+ pMemObj = UserCreateObject(gHandleTable, NULL, NULL, &hMem, TYPE_CLIPDATA,
sizeof(CLIPBOARDDATA) + cbData);
if (!pMemObj)
goto cleanup;
@@ -1111,7 +1111,7 @@
/* If we failed to copy data, remove handle */
if (!pMemObj)
{
- UserDeleteObject(hMem, otClipBoardData);
+ UserDeleteObject(hMem, TYPE_CLIPDATA);
hMem = NULL;
}
@@ -1134,7 +1134,7 @@
UserEnterShared();
/* Get Clipboard data object */
- pMemObj = (PCLIPBOARDDATA)UserGetObject(gHandleTable, hMem, otClipBoardData);
+ pMemObj = (PCLIPBOARDDATA)UserGetObject(gHandleTable, hMem, TYPE_CLIPDATA);
if (!pMemObj)
{
Status = STATUS_INVALID_HANDLE;
Modified: trunk/reactos/win32ss/user/ntuser/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/cursor…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/cursoricon.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/cursoricon.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -77,7 +77,7 @@
return NULL;
}
- CurIcon = (PCURICON_OBJECT)UserReferenceObjectByHandle(hCurIcon, otCursorIcon);
+ CurIcon = (PCURICON_OBJECT)UserReferenceObjectByHandle(hCurIcon, TYPE_CURSOR);
if (!CurIcon)
{
/* We never set ERROR_INVALID_ICON_HANDLE. lets hope noone ever checks for it */
@@ -178,7 +178,7 @@
LIST_FOR_EACH(CurIcon, &gCurIconList, CURICON_OBJECT, ListEntry)
{
- // if (NT_SUCCESS(UserReferenceObjectByPointer(Object, otCursorIcon))) // <-
huh????
+ // if (NT_SUCCESS(UserReferenceObjectByPointer(Object, TYPE_CURSOR))) // <-
huh????
// UserReferenceObject( CurIcon);
// {
if ((CurIcon->hModule == hModule) && (CurIcon->hRsrc == hRsrc))
@@ -209,7 +209,7 @@
PCURICON_OBJECT CurIcon;
HANDLE hCurIcon;
- CurIcon = UserCreateObject(gHandleTable, NULL, NULL, &hCurIcon, otCursorIcon,
sizeof(CURICON_OBJECT));
+ CurIcon = UserCreateObject(gHandleTable, NULL, NULL, &hCurIcon, TYPE_CURSOR,
sizeof(CURICON_OBJECT));
if (!CurIcon)
{
@@ -223,7 +223,7 @@
if (! ReferenceCurIconByProcess(CurIcon))
{
ERR("Failed to add process\n");
- UserDeleteObject(hCurIcon, otCursorIcon);
+ UserDeleteObject(hCurIcon, TYPE_CURSOR);
UserDereferenceObject(CurIcon);
return NULL;
}
@@ -273,7 +273,7 @@
{
/* Set the first process of the list as owner */
Current = CONTAINING_RECORD(CurIcon->ProcessList.Flink, CURICON_PROCESS,
ListEntry);
- UserSetObjectOwner(CurIcon, otCursorIcon, Current->Process);
+ UserSetObjectOwner(CurIcon, TYPE_CURSOR, Current->Process);
}
UserDereferenceObject(CurIcon);
return TRUE;
@@ -310,7 +310,7 @@
/* We were given a pointer, no need to keep the reference anylonger! */
UserDereferenceObject(CurIcon);
- Ret = UserDeleteObject(CurIcon->Self, otCursorIcon);
+ Ret = UserDeleteObject(CurIcon->Self, TYPE_CURSOR);
return Ret;
}
Modified: trunk/reactos/win32ss/user/ntuser/cursoricon_new.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/cursor…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/cursoricon_new.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/cursoricon_new.c [iso-8859-1] Sat Dec 29 19:14:30
2012
@@ -84,7 +84,7 @@
return NULL;
}
- CurIcon = (PCURICON_OBJECT)UserReferenceObjectByHandle(hCurIcon, otCursorIcon);
+ CurIcon = (PCURICON_OBJECT)UserReferenceObjectByHandle(hCurIcon, TYPE_CURSOR);
if (!CurIcon)
{
/* We never set ERROR_INVALID_ICON_HANDLE. lets hope noone ever checks for it */
@@ -229,7 +229,7 @@
if(dwNumber == 0)
dwNumber = 1;
- CurIcon = UserCreateObject(gHandleTable, NULL, NULL, &hCurIcon, otCursorIcon,
sizeof(CURICON_OBJECT));
+ CurIcon = UserCreateObject(gHandleTable, NULL, NULL, &hCurIcon, TYPE_CURSOR,
sizeof(CURICON_OBJECT));
if (!CurIcon)
{
@@ -244,7 +244,7 @@
{
ERR("Failed to add process\n");
UserDereferenceObject(CurIcon);
- UserDeleteObject(hCurIcon, otCursorIcon);
+ UserDeleteObject(hCurIcon, TYPE_CURSOR);
return NULL;
}
@@ -309,7 +309,7 @@
{
/* Set the first process of the list as owner */
Current = CONTAINING_RECORD(CurIcon->ProcessList.Flink, CURICON_PROCESS,
ListEntry);
- UserSetObjectOwner(CurIcon, otCursorIcon, Current->Process);
+ UserSetObjectOwner(CurIcon, TYPE_CURSOR, Current->Process);
}
UserDereferenceObject(CurIcon);
return TRUE;
@@ -350,7 +350,7 @@
/* We were given a pointer, no need to keep the reference anylonger! */
UserDereferenceObject(CurIcon);
- Ret = UserDeleteObject(CurIcon->Self, otCursorIcon);
+ Ret = UserDeleteObject(CurIcon->Self, TYPE_CURSOR);
return Ret;
}
Modified: trunk/reactos/win32ss/user/ntuser/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/event.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/event.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/event.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -141,7 +141,7 @@
RemoveEntryList(&pEH->Chain);
GlobalEvents->Counts--;
if (!GlobalEvents->Counts) gpsi->dwInstalledEventHooks = 0;
- UserDeleteObject(UserHMGetHandle(pEH), otEvent);
+ UserDeleteObject(UserHMGetHandle(pEH), TYPE_WINEVENTHOOK);
KeLeaveCriticalRegion();
return TRUE;
}
@@ -378,7 +378,7 @@
}
}
// Creator, pti is set here.
- pEH = UserCreateObject(gHandleTable, NULL, NULL, &Handle, otEvent,
sizeof(EVENTHOOK));
+ pEH = UserCreateObject(gHandleTable, NULL, NULL, &Handle, TYPE_WINEVENTHOOK,
sizeof(EVENTHOOK));
if (pEH)
{
InsertTailList(&GlobalEvents->Events, &pEH->Chain);
@@ -428,7 +428,7 @@
UserEnterExclusive();
- pEH = (PEVENTHOOK)UserGetObject(gHandleTable, hWinEventHook, otEvent);
+ pEH = (PEVENTHOOK)UserGetObject(gHandleTable, hWinEventHook, TYPE_WINEVENTHOOK);
if (pEH)
{
Ret = IntRemoveEvent(pEH);
Modified: trunk/reactos/win32ss/user/ntuser/hook.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/hook.c…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/hook.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/hook.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -937,7 +937,7 @@
return NULL;
}
- Hook = (PHOOK)UserGetObject(gHandleTable, hHook, otHook);
+ Hook = (PHOOK)UserGetObject(gHandleTable, hHook, TYPE_HOOK);
if (!Hook)
{
EngSetLastError(ERROR_INVALID_HOOK_HANDLE);
@@ -1020,7 +1020,7 @@
Hook->ModuleName.Buffer = NULL;
}
/* Close handle */
- UserDeleteObject(UserHMGetHandle(Hook), otHook);
+ UserDeleteObject(UserHMGetHandle(Hook), TYPE_HOOK);
}
/* Remove a hook, freeing it from the chain */
@@ -1270,7 +1270,7 @@
*/
for(i = 0; pHookHandles[i]; ++i)
{
- Hook = (PHOOK)UserGetObject(gHandleTable, pHookHandles[i], otHook);
+ Hook = (PHOOK)UserGetObject(gHandleTable, pHookHandles[i], TYPE_HOOK);
if(!Hook)
{
ERR("Invalid hook!\n");
@@ -1571,7 +1571,7 @@
}
ObDereferenceObject(WinStaObj);
- Hook = UserCreateObject(gHandleTable, NULL, NULL, (PHANDLE)&Handle, otHook,
sizeof(HOOK));
+ Hook = UserCreateObject(gHandleTable, NULL, NULL, (PHANDLE)&Handle, TYPE_HOOK,
sizeof(HOOK));
if (!Hook)
{
Modified: trunk/reactos/win32ss/user/ntuser/kbdlayout.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/kbdlay…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/kbdlayout.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/kbdlayout.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -131,7 +131,7 @@
L"Control\\Keyboard Layouts\\";
/* Create keyboard layout file object */
- pkf = UserCreateObject(gHandleTable, NULL, NULL, NULL, otKBDfile, sizeof(KBDFILE));
+ pkf = UserCreateObject(gHandleTable, NULL, NULL, NULL, TYPE_KBDFILE,
sizeof(KBDFILE));
if (!pkf)
{
ERR("Failed to create object!\n");
@@ -187,7 +187,7 @@
{
/* We have failed - destroy created object */
if (pkf)
- UserDeleteObject(pkf->head.h, otKBDfile);
+ UserDeleteObject(pkf->head.h, TYPE_KBDFILE);
}
return pRet;
@@ -206,7 +206,7 @@
PKL pKl;
/* Create keyboard layout object */
- pKl = UserCreateObject(gHandleTable, NULL, NULL, NULL, otKBDlayout, sizeof(KL));
+ pKl = UserCreateObject(gHandleTable, NULL, NULL, NULL, TYPE_KBDLAYOUT, sizeof(KL));
if (!pKl)
{
ERR("Failed to create object!\n");
@@ -223,7 +223,7 @@
if (!pKl->spkf)
{
ERR("UserLoadKbdFile(%wZ) failed!\n", pwszKLID);
- UserDeleteObject(pKl->head.h, otKBDlayout);
+ UserDeleteObject(pKl->head.h, TYPE_KBDLAYOUT);
return NULL;
}
@@ -272,7 +272,7 @@
*ppkfLink = pkf->pkfNext;
EngUnloadImage(pkf->hBase);
- UserDeleteObject(pkf->head.h, otKBDfile);
+ UserDeleteObject(pkf->head.h, TYPE_KBDFILE);
}
/*
@@ -308,7 +308,7 @@
pKl->pklPrev->pklNext = pKl->pklNext;
pKl->pklNext->pklPrev = pKl->pklPrev;
UnloadKbdFile(pKl->spkf);
- UserDeleteObject(pKl->head.h, otKBDlayout);
+ UserDeleteObject(pKl->head.h, TYPE_KBDLAYOUT);
return TRUE;
}
Modified: trunk/reactos/win32ss/user/ntuser/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/menu.c…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/menu.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -63,7 +63,7 @@
return NULL;
}
- Menu = (PMENU_OBJECT)UserGetObject(gHandleTable, hMenu, otMenu);
+ Menu = (PMENU_OBJECT)UserGetObject(gHandleTable, hMenu, TYPE_MENU);
if (!Menu)
{
EngSetLastError(ERROR_INVALID_MENU_HANDLE);
@@ -234,7 +234,7 @@
}
}
// UserDereferenceObject(Menu);
- ret = UserDeleteObject(Menu->MenuInfo.Self, otMenu);
+ ret = UserDeleteObject(Menu->MenuInfo.Self, TYPE_MENU);
ObDereferenceObject(WindowStation);
return ret;
}
@@ -252,7 +252,7 @@
NULL,
NULL,
Handle,
- otMenu,
+ TYPE_MENU,
sizeof(MENU_OBJECT));
if(!Menu)
{
@@ -364,7 +364,7 @@
NULL,
NULL,
&hMenu,
- otMenu,
+ TYPE_MENU,
sizeof(MENU_OBJECT));
if(!Menu)
return NULL;
Modified: trunk/reactos/win32ss/user/ntuser/monitor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/monito…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/monitor.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/monitor.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -32,7 +32,7 @@
PMONITOR
IntCreateMonitorObject()
{
- return UserCreateObject(gHandleTable, NULL, NULL, NULL, otMonitor, sizeof(MONITOR));
+ return UserCreateObject(gHandleTable, NULL, NULL, NULL, TYPE_MONITOR,
sizeof(MONITOR));
}
/* IntDestroyMonitorObject
@@ -58,7 +58,7 @@
/* Destroy monitor object */
UserDereferenceObject(pMonitor);
- UserDeleteObject(UserHMGetHandle(pMonitor), otMonitor);
+ UserDeleteObject(UserHMGetHandle(pMonitor), TYPE_MONITOR);
}
/* UserGetMonitorObject
@@ -81,7 +81,7 @@
return NULL;
}
- pMonitor = (PMONITOR)UserGetObject(gHandleTable, hMonitor, otMonitor);
+ pMonitor = (PMONITOR)UserGetObject(gHandleTable, hMonitor, TYPE_MONITOR);
if (!pMonitor)
{
EngSetLastError(ERROR_INVALID_MONITOR_HANDLE);
Modified: trunk/reactos/win32ss/user/ntuser/object.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/object…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/object.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/object.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -16,7 +16,7 @@
void DbgUserDumpHandleTable()
{
- int HandleCounts[USER_HANDLE_TYPE_COUNT];
+ int HandleCounts[TYPE_CTYPES];
PPROCESSINFO ppiList;
int i;
PWCHAR TypeNames[] = {L"Free",L"Window",L"Menu",
L"CursorIcon", L"SMWP", L"Hook", L"ClipBoardData",
L"CallProc",
@@ -33,7 +33,7 @@
{
ERR("Process %s (%d) handles count: %d\n\t",
ppiList->peProcess->ImageFileName, ppiList->peProcess->UniqueProcessId,
ppiList->UserHandleCount);
- for (i = 1 ;i < USER_HANDLE_TYPE_COUNT; i++)
+ for (i = 1 ;i < TYPE_CTYPES; i++)
{
HandleCounts[i] += ppiList->DbgHandleCount[i];
@@ -48,7 +48,7 @@
/* Print total type counts */
ERR("Total handles of the running processes: \n\t");
- for (i = 1 ;i < USER_HANDLE_TYPE_COUNT; i++)
+ for (i = 1 ;i < TYPE_CTYPES; i++)
{
DbgPrint("%S: %d, ", TypeNames[i], HandleCounts[i]);
if (i % 6 == 0)
@@ -62,7 +62,7 @@
HandleCounts[gHandleTable->handles[i].type]++;
ERR("Total handles count allocated: \n\t");
- for (i = 1 ;i < USER_HANDLE_TYPE_COUNT; i++)
+ for (i = 1 ;i < TYPE_CTYPES; i++)
{
DbgPrint("%S: %d, ", TypeNames[i], HandleCounts[i]);
if (i % 6 == 0)
@@ -174,27 +174,27 @@
}
static __inline PVOID
-UserHandleOwnerByType(USER_OBJECT_TYPE type)
+UserHandleOwnerByType(HANDLE_TYPE type)
{
PVOID pi;
switch (type)
{
- case otWindow:
- case otInputContext:
+ case TYPE_WINDOW:
+ case TYPE_INPUTCONTEXT:
pi = GetW32ThreadInfo();
break;
- case otMenu:
- case otCursorIcon:
- case otHook:
- case otCallProc:
- case otAccel:
- case otSMWP:
+ case TYPE_MENU:
+ case TYPE_CURSOR:
+ case TYPE_HOOK:
+ case TYPE_CALLPROC:
+ case TYPE_ACCELTABLE:
+ case TYPE_SETWINDOWPOS:
pi = GetW32ProcessInfo();
break;
- case otMonitor:
+ case TYPE_MONITOR:
pi = NULL; /* System */
break;
@@ -207,7 +207,7 @@
}
/* allocate a user handle for a given object */
-HANDLE UserAllocHandle(PUSER_HANDLE_TABLE ht, PVOID object, USER_OBJECT_TYPE type )
+HANDLE UserAllocHandle(PUSER_HANDLE_TABLE ht, PVOID object, HANDLE_TYPE type )
{
PUSER_HANDLE_ENTRY entry = alloc_user_entry(ht);
if (!entry)
@@ -226,7 +226,7 @@
}
/* return a pointer to a user object from its handle without setting an error */
-PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type )
+PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type )
{
PUSER_HANDLE_ENTRY entry;
@@ -240,7 +240,7 @@
}
/* return a pointer to a user object from its handle */
-PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type )
+PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type )
{
PUSER_HANDLE_ENTRY entry;
@@ -269,7 +269,7 @@
/* Same as get_user_object plus set the handle to the full 32-bit value */
-void *get_user_object_handle(PUSER_HANDLE_TABLE ht, HANDLE* handle, USER_OBJECT_TYPE
type )
+void *get_user_object_handle(PUSER_HANDLE_TABLE ht, HANDLE* handle, HANDLE_TYPE type )
{
PUSER_HANDLE_ENTRY entry;
@@ -317,7 +317,7 @@
PDESKTOP pDesktop,
PTHREADINFO pti,
HANDLE* h,
- USER_OBJECT_TYPE type,
+ HANDLE_TYPE type,
ULONG size)
{
HANDLE hi;
@@ -336,11 +336,11 @@
switch (type)
{
- case otWindow:
-// case otMenu:
- case otHook:
- case otCallProc:
- case otInputContext:
+ case TYPE_WINDOW:
+// case TYPE_MENU:
+ case TYPE_HOOK:
+ case TYPE_CALLPROC:
+ case TYPE_INPUTCONTEXT:
Object = DesktopHeapAlloc(rpdesk, size);
dt = TRUE;
break;
@@ -373,22 +373,22 @@
switch (type)
{
- case otWindow:
- case otHook:
- case otInputContext:
+ case TYPE_WINDOW:
+ case TYPE_HOOK:
+ case TYPE_INPUTCONTEXT:
((PTHRDESKHEAD)Object)->rpdesk = rpdesk;
((PTHRDESKHEAD)Object)->pSelf = Object;
- case otEvent:
+ case TYPE_WINEVENTHOOK:
((PTHROBJHEAD)Object)->pti = pti;
break;
- case otMenu:
- case otCallProc:
+ case TYPE_MENU:
+ case TYPE_CALLPROC:
((PPROCDESKHEAD)Object)->rpdesk = rpdesk;
((PPROCDESKHEAD)Object)->pSelf = Object;
break;
- case otCursorIcon:
+ case TYPE_CURSOR:
((PPROCMARKHEAD)Object)->ppi = ppi;
break;
@@ -410,7 +410,7 @@
UserDereferenceObject(PVOID object)
{
PUSER_HANDLE_ENTRY entry;
- USER_OBJECT_TYPE type;
+ HANDLE_TYPE type;
ASSERT(((PHEAD)object)->cLockObj >= 1);
@@ -435,11 +435,11 @@
switch (type)
{
- case otWindow:
-// case otMenu:
- case otHook:
- case otCallProc:
- case otInputContext:
+ case TYPE_WINDOW:
+// case TYPE_MENU:
+ case TYPE_HOOK:
+ case TYPE_CALLPROC:
+ case TYPE_INPUTCONTEXT:
return DesktopHeapFree(((PTHRDESKHEAD)object)->rpdesk, object);
default:
@@ -482,7 +482,7 @@
BOOL
FASTCALL
-UserDeleteObject(HANDLE h, USER_OBJECT_TYPE type )
+UserDeleteObject(HANDLE h, HANDLE_TYPE type )
{
PVOID body = UserGetObject(gHandleTable, h, type);
@@ -504,7 +504,7 @@
PVOID
FASTCALL
-UserReferenceObjectByHandle(HANDLE handle, USER_OBJECT_TYPE type)
+UserReferenceObjectByHandle(HANDLE handle, HANDLE_TYPE type)
{
PVOID object;
@@ -518,7 +518,7 @@
VOID
FASTCALL
-UserSetObjectOwner(PVOID obj, USER_OBJECT_TYPE type, PVOID owner)
+UserSetObjectOwner(PVOID obj, HANDLE_TYPE type, PVOID owner)
{
PUSER_HANDLE_ENTRY entry = handle_to_entry(gHandleTable, ((PHEAD)obj)->h );
PPROCESSINFO ppi, oldppi;
@@ -529,7 +529,7 @@
/* For now, only supported for CursorIcon object */
switch(type)
{
- case otCursorIcon:
+ case TYPE_CURSOR:
ppi = (PPROCESSINFO)owner;
entry->pi = ppi;
oldppi = ((PPROCMARKHEAD)obj)->ppi;
@@ -575,37 +575,37 @@
}
switch (uType)
{
- case otWindow:
+ case TYPE_WINDOW:
{
if (UserGetWindowObject((HWND) handle)) return TRUE;
return FALSE;
}
- case otMenu:
+ case TYPE_MENU:
{
if (UserGetMenuObject((HMENU) handle)) return TRUE;
return FALSE;
}
- case otAccel:
+ case TYPE_ACCELTABLE:
{
if (UserGetAccelObject((HACCEL) handle)) return TRUE;
return FALSE;
}
- case otCursorIcon:
+ case TYPE_CURSOR:
{
if (UserGetCurIconObject((HCURSOR) handle)) return TRUE;
return FALSE;
}
- case otHook:
+ case TYPE_HOOK:
{
if (IntGetHookObject((HHOOK) handle)) return TRUE;
return FALSE;
}
- case otMonitor:
+ case TYPE_MONITOR:
{
if (UserGetMonitorObject((HMONITOR) handle)) return TRUE;
return FALSE;
}
- case otCallProc:
+ case TYPE_CALLPROC:
{
WNDPROC_INFO Proc;
return UserGetCallProcInfo( handle, &Proc );
Modified: trunk/reactos/win32ss/user/ntuser/object.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/object…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/object.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/object.h [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -31,16 +31,16 @@
extern PUSER_HANDLE_TABLE gHandleTable;
VOID FASTCALL UserReferenceObject(PVOID obj);
-PVOID FASTCALL UserReferenceObjectByHandle(HANDLE handle, USER_OBJECT_TYPE type);
+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,USER_OBJECT_TYPE type , ULONG size);
-BOOL FASTCALL UserDeleteObject(HANDLE h, USER_OBJECT_TYPE type );
-PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, USER_OBJECT_TYPE type );
-PVOID UserGetObjectNoErr(PUSER_HANDLE_TABLE, HANDLE, USER_OBJECT_TYPE);
+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();
-VOID FASTCALL UserSetObjectOwner(PVOID obj, USER_OBJECT_TYPE type, PVOID owner);
+VOID FASTCALL UserSetObjectOwner(PVOID obj, HANDLE_TYPE type, PVOID owner);
static __inline VOID
UserRefObjectCo(PVOID obj, PUSER_REFERENCE_ENTRY UserReferenceEntry)
Modified: trunk/reactos/win32ss/user/ntuser/painting.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/painti…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/painting.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/painting.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -1141,7 +1141,7 @@
if (!Ret) goto Exit;
- if (!( pWnd = (PWND)UserGetObject(gHandleTable, finfo.hwnd, otWindow)) ||
+ if (!( pWnd = (PWND)UserGetObject(gHandleTable, finfo.hwnd, TYPE_WINDOW)) ||
finfo.cbSize != sizeof(FLASHWINFO) ||
finfo.dwFlags & ~(FLASHW_ALL|FLASHW_TIMER|FLASHW_TIMERNOFG) )
{
Modified: trunk/reactos/win32ss/user/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/simple…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/simplecall.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -186,13 +186,13 @@
NULL,
NULL,
(PHANDLE)&hDwp,
- otSMWP,
+ TYPE_SETWINDOWPOS,
sizeof(SMWP));
if (!psmwp) RETURN(0);
psmwp->acvr = ExAllocatePoolWithTag(PagedPool, count * sizeof(CVR),
USERTAG_SWP);
if (!psmwp->acvr)
{
- UserDeleteObject(hDwp, otSMWP);
+ UserDeleteObject(hDwp, TYPE_SETWINDOWPOS);
RETURN(0);
}
RtlZeroMemory(psmwp->acvr, count * sizeof(CVR));
Modified: trunk/reactos/win32ss/user/ntuser/timer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/timer.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/timer.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/timer.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -56,7 +56,7 @@
HANDLE Handle;
PTIMER Ret = NULL;
- Ret = UserCreateObject(gHandleTable, NULL, NULL, &Handle, otTimer, sizeof(TIMER));
+ Ret = UserCreateObject(gHandleTable, NULL, NULL, &Handle, TYPE_TIMER,
sizeof(TIMER));
if (Ret)
{
Ret->head.h = Handle;
@@ -86,7 +86,7 @@
IntUnlockWindowlessTimerBitmap();
}
UserDereferenceObject(pTmr);
- Ret = UserDeleteObject( UserHMGetHandle(pTmr), otTimer);
+ Ret = UserDeleteObject( UserHMGetHandle(pTmr), TYPE_TIMER);
}
if (!Ret) ERR("Warning: Unable to delete timer\n");
Modified: trunk/reactos/win32ss/user/ntuser/win32.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/win32.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/win32.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/win32.h [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -225,7 +225,7 @@
#if DBG
BYTE DbgChannelLevel[DbgChCount];
- DWORD DbgHandleCount[USER_HANDLE_TYPE_COUNT];
+ DWORD DbgHandleCount[TYPE_CTYPES];
#endif
} PROCESSINFO;
Modified: trunk/reactos/win32ss/user/ntuser/window.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -90,7 +90,7 @@
PWND FASTCALL ValidateHwndNoErr(HWND hWnd)
{
- if (hWnd) return (PWND)UserGetObjectNoErr(gHandleTable, hWnd, otWindow);
+ if (hWnd) return (PWND)UserGetObjectNoErr(gHandleTable, hWnd, TYPE_WINDOW);
return NULL;
}
@@ -105,7 +105,7 @@
return NULL;
}
- Window = (PWND)UserGetObject(gHandleTable, hWnd, otWindow);
+ Window = (PWND)UserGetObject(gHandleTable, hWnd, TYPE_WINDOW);
if (!Window || 0 != (Window->state & WNDS_DESTROYED))
{
EngSetLastError(ERROR_INVALID_WINDOW_HANDLE);
@@ -555,7 +555,7 @@
IntUnlinkWindow(Window);
UserReferenceObject(Window);
- UserDeleteObject(Window->head.h, otWindow);
+ UserDeleteObject(Window->head.h, TYPE_WINDOW);
IntDestroyScrollBars(Window);
@@ -662,7 +662,7 @@
if (IsCallProcHandle(NewWndProc))
{
- CallProc = UserGetObject(gHandleTable, NewWndProc, otCallProc);
+ CallProc = UserGetObject(gHandleTable, NewWndProc, TYPE_CALLPROC);
if (CallProc)
{ // Reset new WndProc.
NewWndProc = CallProc->pfnClientPrevious;
@@ -1717,7 +1717,7 @@
pdeskCreated ? pdeskCreated : pti->rpdesk,
pti,
(PHANDLE)&hWnd,
- otWindow,
+ TYPE_WINDOW,
sizeof(WND) + Class->cbwndExtra);
if (!pWnd)
Modified: trunk/reactos/win32ss/user/ntuser/winpos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winpos…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -2472,7 +2472,7 @@
return NULL;
}
- if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, otSMWP)))
+ if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, TYPE_SETWINDOWPOS)))
{
EngSetLastError(ERROR_INVALID_DWP_HANDLE);
return NULL;
@@ -2543,7 +2543,7 @@
TRACE("%p\n", hdwp);
- if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, otSMWP)))
+ if (!(pDWP = (PSMWP)UserGetObject(gHandleTable, hdwp, TYPE_SETWINDOWPOS)))
{
EngSetLastError(ERROR_INVALID_DWP_HANDLE);
return FALSE;
@@ -2597,7 +2597,7 @@
}
ExFreePoolWithTag(pDWP->acvr, USERTAG_SWP);
UserDereferenceObject(pDWP);
- UserDeleteObject(hdwp, otSMWP);
+ UserDeleteObject(hdwp, TYPE_SETWINDOWPOS);
return res;
}
Modified: trunk/reactos/win32ss/user/user32/include/user_x.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/includ…
==============================================================================
--- trunk/reactos/win32ss/user/user32/include/user_x.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/include/user_x.h [iso-8859-1] Sat Dec 29 19:14:30
2012
@@ -109,4 +109,4 @@
#define HOOKID_TO_FLAG(HookId) (1 << ((HookId) + 1))
#define ISITHOOKED(HookId) (GetWin32ClientInfo()->fsHooks & HOOKID_TO_FLAG(HookId)
||\
(GetWin32ClientInfo()->pDeskInfo &&
GetWin32ClientInfo()->pDeskInfo->fsHooks & HOOKID_TO_FLAG(HookId)))
-
+
Modified: trunk/reactos/win32ss/user/user32/misc/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/m…
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/misc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/misc.c [iso-8859-1] Sat Dec 29 19:14:30 2012
@@ -303,24 +303,30 @@
/*
* Decide whether an object is located on the desktop or shared heap
*/
-static const BOOL g_ObjectHeapTypeShared[otEvent + 1] =
-{
- FALSE, /* otFree (not used) */
- FALSE, /* otWindow */
- TRUE, /* otMenu FALSE */
- TRUE, /* otCursorIcon */
- TRUE, /* otSMWP */
- FALSE, /* otHook */
- FALSE, /* (not used) */
- FALSE, /* otCallProc */
- TRUE, /* otAccel */
- FALSE, /* (not used) */
- FALSE, /* (not used) */
- FALSE, /* (not used) */
- TRUE, /* otMonitor */
- FALSE, /* (not used) */
- FALSE, /* (not used) */
- TRUE /* otEvent */
+static const BOOL g_ObjectHeapTypeShared[TYPE_CTYPES] =
+{
+ FALSE, /* TYPE_FREE (not used) */
+ FALSE, /* TYPE_WINDOW */
+ TRUE, /* TYPE_MENU FALSE */
+ TRUE, /* TYPE_CURSOR */
+ TRUE, /* TYPE_SETWINDOWPOS */
+ FALSE, /* TYPE_HOOK */
+ FALSE, /* TYPE_CLIPDATA */
+ FALSE, /* TYPE_CALLPROC */
+ TRUE, /* TYPE_ACCELTABLE */
+ FALSE, /* TYPE_DDEACCESS */
+ FALSE, /* TYPE_DDECONV */
+ FALSE, /* TYPE_DDEXACT */
+ TRUE, /* TYPE_MONITOR */
+ FALSE, /* TYPE_KBDLAYOUT */
+ FALSE, /* TYPE_KBDFILE */
+ TRUE /* TYPE_WINEVENTHOOK */
+ FALSE, /* TYPE_TIMER */
+ FALSE, /* TYPE_INPUTCONTEXT */
+ FALSE, /* TYPE_HIDDATA */
+ FALSE, /* TYPE_DEVICEINFO */
+ FALSE, /* TYPE_TOUCHINPUTINFO */
+ FALSE, /* TYPE_GESTUREINFOOBJ */
};
//
@@ -333,7 +339,7 @@
PVOID ret;
PUSER_HANDLE_ENTRY pEntry;
- ASSERT(uType <= otEvent);
+ ASSERT(uType < TYPE_CTYPES);
pEntry = GetUser32Handle(handle);
@@ -348,22 +354,22 @@
{
switch ( uType )
{ // Test (with wine too) confirms these results!
- case otWindow:
+ case TYPE_WINDOW:
SetLastError(ERROR_INVALID_WINDOW_HANDLE);
break;
- case otMenu:
+ case TYPE_MENU:
SetLastError(ERROR_INVALID_MENU_HANDLE);
break;
- case otCursorIcon:
+ case TYPE_CURSOR:
SetLastError(ERROR_INVALID_CURSOR_HANDLE);
break;
- case otSMWP:
+ case TYPE_SETWINDOWPOS:
SetLastError(ERROR_INVALID_DWP_HANDLE);
break;
- case otHook:
+ case TYPE_HOOK:
SetLastError(ERROR_INVALID_HOOK_HANDLE);
break;
- case otAccel:
+ case TYPE_ACCELTABLE:
SetLastError(ERROR_INVALID_ACCEL_HANDLE);
break;
default:
@@ -391,7 +397,7 @@
PVOID ret;
PUSER_HANDLE_ENTRY pEntry;
- ASSERT(uType <= otEvent);
+ ASSERT(uType < TYPE_CTYPES);
pEntry = GetUser32Handle(handle);
@@ -419,7 +425,7 @@
{
PUSER_HANDLE_ENTRY pEntry;
- PCALLPROCDATA CallProc = ValidateHandle(hCallProc, otCallProc);
+ PCALLPROCDATA CallProc = ValidateHandle(hCallProc, TYPE_CALLPROC);
pEntry = GetUser32Handle(hCallProc);
@@ -444,7 +450,7 @@
if (hwnd && hwnd == ClientInfo->CallbackWnd.hWnd)
return ClientInfo->CallbackWnd.pWnd;
- return ValidateHandle((HANDLE)hwnd, otWindow);
+ return ValidateHandle((HANDLE)hwnd, TYPE_WINDOW);
}
//
@@ -462,7 +468,7 @@
if (hwnd == ClientInfo->CallbackWnd.hWnd)
return ClientInfo->CallbackWnd.pWnd;
- Wnd = ValidateHandleNoErr((HANDLE)hwnd, otWindow);
+ Wnd = ValidateHandleNoErr((HANDLE)hwnd, TYPE_WINDOW);
if (Wnd != NULL)
{
return Wnd;
Modified: trunk/reactos/win32ss/user/user32/windows/menu.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/menu.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/menu.c [iso-8859-1] Sat Dec 29 19:14:30
2012
@@ -3241,7 +3241,7 @@
while (! fEndMenu)
{
BOOL ErrorExit = FALSE;
- PVOID menu = ValidateHandle(mt.CurrentMenu, otMenu);
+ PVOID menu = ValidateHandle(mt.CurrentMenu, TYPE_MENU);
if (!menu) /* sometimes happens if I do a window manager close */
break;
@@ -4767,7 +4767,7 @@
IsMenu(
HMENU Menu)
{
- if (ValidateHandle(Menu, otMenu)) return TRUE;
+ if (ValidateHandle(Menu, TYPE_MENU)) return TRUE;
return FALSE;
}