Author: tkreuzer
Date: Wed May 2 19:29:33 2012
New Revision: 56478
URL:
http://svn.reactos.org/svn/reactos?rev=56478&view=rev
Log:
[WIN32K]
A pointer is not a handle. A handle is not a pointer. At least in most cases. Defining
STRICT in win32k revealed horrible things...
Modified:
trunk/reactos/win32ss/gdi/eng/engbrush.c
trunk/reactos/win32ss/gdi/eng/mouse.c
trunk/reactos/win32ss/gdi/eng/pdevobj.c
trunk/reactos/win32ss/gdi/ntgdi/bitblt.c
trunk/reactos/win32ss/gdi/ntgdi/region.c
trunk/reactos/win32ss/pch.h
trunk/reactos/win32ss/reactx/ntddraw/dxeng.c
trunk/reactos/win32ss/user/ntuser/caret.c
trunk/reactos/win32ss/user/ntuser/class.c
trunk/reactos/win32ss/user/ntuser/clipboard.c
trunk/reactos/win32ss/user/ntuser/desktop.c
trunk/reactos/win32ss/user/ntuser/hook.c
trunk/reactos/win32ss/user/ntuser/keyboard.c
trunk/reactos/win32ss/user/ntuser/misc/registry.c
trunk/reactos/win32ss/user/ntuser/msgqueue.c
trunk/reactos/win32ss/user/ntuser/simplecall.c
Modified: trunk/reactos/win32ss/gdi/eng/engbrush.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engbrush.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/engbrush.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/engbrush.c [iso-8859-1] Wed May 2 19:29:33 2012
@@ -165,7 +165,7 @@
psurfRealize = SURFACE_ShareLockSurface(hbmpRealize);
/* Already delete the pattern bitmap (will be kept until dereferenced) */
- EngDeleteSurface(hbmpRealize);
+ EngDeleteSurface((HSURF)hbmpRealize);
if (!psurfRealize)
{
Modified: trunk/reactos/win32ss/gdi/eng/mouse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/mouse.c?re…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/mouse.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/mouse.c [iso-8859-1] Wed May 2 19:29:33 2012
@@ -477,11 +477,11 @@
failure:
/* Cleanup surfaces */
- if (hbmMask) EngDeleteSurface(hbmMask);
+ if (hbmMask) EngDeleteSurface((HSURF)hbmMask);
if (psurfMask) SURFACE_ShareUnlockSurface(psurfMask);
- if (hbmColor) EngDeleteSurface(hbmColor);
+ if (hbmColor) EngDeleteSurface((HSURF)hbmColor);
if (psurfColor) SURFACE_ShareUnlockSurface(psurfColor);
- if (hbmSave) EngDeleteSurface(hbmSave);
+ if (hbmSave) EngDeleteSurface((HSURF)hbmSave);
if (psurfSave) SURFACE_ShareUnlockSurface(psurfSave);
return SPS_ERROR;
Modified: trunk/reactos/win32ss/gdi/eng/pdevobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/pdevobj.c?…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/pdevobj.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/pdevobj.c [iso-8859-1] Wed May 2 19:29:33 2012
@@ -832,7 +832,7 @@
for (ppdev = gppdevList; ppdev; ppdev = ppdev->ppdevNext)
{
/* Compare with the given HDEV */
- if (ppdev == hdev)
+ if (ppdev == (PPDEVOBJ)hdev)
{
/* Found the PDEV! Get it's dhpdev and break */
dhpdev = ppdev->dhpdev;
Modified: trunk/reactos/win32ss/gdi/ntgdi/bitblt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/bitblt.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/bitblt.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/bitblt.c [iso-8859-1] Wed May 2 19:29:33 2012
@@ -138,7 +138,7 @@
DPRINT("Locking DCs\n");
ahDC[0] = hDCDest;
ahDC[1] = hDCSrc ;
- if (!GDIOBJ_bLockMultipleObjects(2, ahDC, apObj, GDIObjType_DC_TYPE))
+ if (!GDIOBJ_bLockMultipleObjects(2, (HGDIOBJ*)ahDC, apObj, GDIObjType_DC_TYPE))
{
DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to
NtGdiAlphaBlend\n", hDCDest, hDCSrc);
EngSetLastError(ERROR_INVALID_HANDLE);
@@ -286,7 +286,7 @@
DPRINT("Locking DCs\n");
ahDC[0] = hdcDst;
ahDC[1] = hdcSrc ;
- if (!GDIOBJ_bLockMultipleObjects(2, ahDC, apObj, GDIObjType_DC_TYPE))
+ if (!GDIOBJ_bLockMultipleObjects(2, (HGDIOBJ*)ahDC, apObj, GDIObjType_DC_TYPE))
{
DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to
NtGdiAlphaBlend\n", hdcDst, hdcSrc);
EngSetLastError(ERROR_INVALID_HANDLE);
@@ -440,7 +440,7 @@
DPRINT("Locking DCs\n");
ahDC[0] = hdcDest;
ahDC[1] = UsesSource ? hdcSrc : NULL;
- if (!GDIOBJ_bLockMultipleObjects(2, ahDC, apObj, GDIObjType_DC_TYPE))
+ if (!GDIOBJ_bLockMultipleObjects(2, (HGDIOBJ*)ahDC, apObj, GDIObjType_DC_TYPE))
{
DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to
NtGdiAlphaBlend\n", hdcDest, hdcSrc);
EngSetLastError(ERROR_INVALID_HANDLE);
@@ -635,7 +635,7 @@
ahDC[0] = hDCDest;
ahDC[1] = UsesSource ? hDCSrc : NULL;
ahDC[2] = UsesMask ? hDCMask : NULL;
- if (!GDIOBJ_bLockMultipleObjects(3, ahDC, apObj, GDIObjType_DC_TYPE))
+ if (!GDIOBJ_bLockMultipleObjects(3, (HGDIOBJ*)ahDC, apObj, GDIObjType_DC_TYPE))
{
DPRINT1("Invalid dc handle (dest=0x%08x, src=0x%08x) passed to
NtGdiAlphaBlend\n", hDCDest, hDCSrc);
EngSetLastError(ERROR_INVALID_HANDLE);
Modified: trunk/reactos/win32ss/gdi/ntgdi/region.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/region.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/ntgdi/region.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/ntgdi/region.c [iso-8859-1] Wed May 2 19:29:33 2012
@@ -3346,7 +3346,7 @@
ahrgn[0] = hrgnDst;
ahrgn[1] = hrgnSrc1;
ahrgn[2] = iMode != RGN_COPY ? hrgnSrc2 : NULL;
- if (!GDIOBJ_bLockMultipleObjects(3, ahrgn, (PVOID*)aprgn, GDIObjType_RGN_TYPE))
+ if (!GDIOBJ_bLockMultipleObjects(3, (HGDIOBJ*)ahrgn, (PVOID*)aprgn,
GDIObjType_RGN_TYPE))
{
DPRINT1("NtGdiCombineRgn: %p, %p, %p, %d\n",
hrgnDst, hrgnSrc1, hrgnSrc2, iMode);
Modified: trunk/reactos/win32ss/pch.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/pch.h?rev=56478&am…
==============================================================================
--- trunk/reactos/win32ss/pch.h [iso-8859-1] (original)
+++ trunk/reactos/win32ss/pch.h [iso-8859-1] Wed May 2 19:29:33 2012
@@ -11,6 +11,7 @@
/* INCLUDES ******************************************************************/
#define _NO_COM
+#define STRICT
/* DDK/NDK/SDK headers */
#undef NTDDI_VERSION
Modified: trunk/reactos/win32ss/reactx/ntddraw/dxeng.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/reactx/ntddraw/dxe…
==============================================================================
--- trunk/reactos/win32ss/reactx/ntddraw/dxeng.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/reactx/ntddraw/dxeng.c [iso-8859-1] Wed May 2 19:29:33 2012
@@ -533,7 +533,7 @@
DPRINT1("hDev : 0x%08lx\n",hDev);
- Resource = ppdev->hsemDevLock;
+ Resource = (PERESOURCE)ppdev->hsemDevLock;
if (Resource)
{
@@ -564,7 +564,7 @@
DxEngUnlockHdev(HDEV hDev)
{
PPDEVOBJ ppdev = (PPDEVOBJ)hDev;
- PERESOURCE Resource = ppdev->hsemDevLock;
+ PERESOURCE Resource = (PERESOURCE)ppdev->hsemDevLock;
DPRINT1("ReactX Calling : DxEngUnlockHdev \n");
@@ -674,7 +674,7 @@
APIENTRY
DxEngIsHdevLockedByCurrentThread(HDEV hDev)
{ // Based on EngIsSemaphoreOwnedByCurrentThread w/o the Ex call.
- PERESOURCE pSem = ((PPDEVOBJ)hDev)->hsemDevLock;
+ PERESOURCE pSem = (PERESOURCE)(((PPDEVOBJ)hDev)->hsemDevLock);
return pSem->OwnerEntry.OwnerThread == (ERESOURCE_THREAD)PsGetCurrentThread();
}
Modified: trunk/reactos/win32ss/user/ntuser/caret.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/caret.…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/caret.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/caret.c [iso-8859-1] Wed May 2 19:29:33 2012
@@ -1,4 +1,4 @@
-/*
+/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS Win32k subsystem
* PURPOSE: Caret functions
@@ -164,7 +164,8 @@
if(ThreadQueue->CaretInfo->Visible)
{
- IntKillTimer(ThreadQueue->CaretInfo->hWnd, IDCARETTIMER, TRUE);
+ PWND pwnd = UserGetWindowObject(ThreadQueue->CaretInfo->hWnd);
+ IntKillTimer(pwnd, IDCARETTIMER, TRUE);
co_IntHideCaret(ThreadQueue->CaretInfo);
ThreadQueue->CaretInfo->Visible = 0;
@@ -247,7 +248,8 @@
if (ThreadQueue->CaretInfo->Visible)
{
- IntKillTimer(hWnd, IDCARETTIMER, TRUE);
+ PWND pwnd = UserGetWindowObject(hWnd);
+ IntKillTimer(pwnd, IDCARETTIMER, TRUE);
co_IntHideCaret(ThreadQueue->CaretInfo);
}
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] Wed May 2 19:29:33 2012
@@ -15,7 +15,7 @@
CS_GLOBALCLASS|CS_DBLCLKS,
NULL,
0,
- IDC_ARROW,
+ (HICON)IDC_ARROW,
(HBRUSH)(COLOR_BACKGROUND + 1),
FNID_DESKTOP,
ICLS_DESKTOP
@@ -24,7 +24,7 @@
CS_VREDRAW|CS_HREDRAW|CS_SAVEBITS,
NULL, // Use User32 procs
sizeof(LONG),
- IDC_ARROW,
+ (HICON)IDC_ARROW,
NULL,
FNID_SWITCH,
ICLS_SWITCH
@@ -33,7 +33,7 @@
CS_DBLCLKS|CS_SAVEBITS,
NULL, // Use User32 procs
sizeof(LONG),
- IDC_ARROW,
+ (HICON)IDC_ARROW,
(HBRUSH)(COLOR_MENU + 1),
FNID_MENU,
ICLS_MENU
@@ -42,7 +42,7 @@
CS_DBLCLKS|CS_VREDRAW|CS_HREDRAW|CS_PARENTDC,
NULL, // Use User32 procs
sizeof(SBWND)-sizeof(WND),
- IDC_ARROW,
+ (HICON)IDC_ARROW,
NULL,
FNID_SCROLLBAR,
ICLS_SCROLLBAR
@@ -51,7 +51,7 @@
0,
NULL, // Use User32 procs
0,
- IDC_ARROW,
+ (HICON)IDC_ARROW,
0,
FNID_ICONTITLE,
ICLS_ICONTITLE
@@ -60,7 +60,7 @@
CS_GLOBALCLASS,
NULL, // Use User32 procs
0,
- IDC_ARROW,
+ (HICON)IDC_ARROW,
NULL,
FNID_MESSAGEWND,
ICLS_HWNDMESSAGE
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] Wed May 2 19:29:33 2012
@@ -173,7 +173,7 @@
{
pMemObj->cbData = sizeof(BITMAPINFOHEADER) + bi.bmiHeader.biSizeImage;
memcpy(pMemObj->Data, &bi, sizeof(BITMAPINFOHEADER));
- NtGdiGetDIBitsInternal(hdc, pMemObj->Data, 0, bm.bmHeight,
(LPBYTE)pMemObj->Data + sizeof(BITMAPINFOHEADER), &bi, DIB_RGB_COLORS, 0, 0);
+ NtGdiGetDIBitsInternal(hdc, hBm, 0, bm.bmHeight, (LPBYTE)pMemObj->Data +
sizeof(BITMAPINFOHEADER), &bi, DIB_RGB_COLORS, 0, 0);
IntAddFormatedData(pWinStaObj, CF_DIB, hMem, TRUE, TRUE);
}
@@ -478,7 +478,7 @@
NtUserCloseClipboard(VOID)
{
BOOL bRet;
-
+
UserEnterExclusive();
bRet = UserCloseClipboard();
UserLeave();
@@ -714,7 +714,7 @@
pWinStaObj = IntGetWinStaForCbAccess();
if (!pWinStaObj)
goto cleanup;
-
+
if (pWinStaObj->pClipBase == NULL)
{
iRet = 0;
@@ -1002,7 +1002,7 @@
cleanup:
if(pWinStaObj)
ObDereferenceObject(pWinStaObj);
-
+
UserLeave();
return hWndNext;
Modified: trunk/reactos/win32ss/user/ntuser/desktop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/deskto…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] Wed May 2 19:29:33 2012
@@ -237,7 +237,7 @@
pwstrDesktop = wcschr(DesktopPath->Buffer, L'\\');
if(pwstrDesktop != NULL)
{
- *pwstrDesktop = 0;
+ *pwstrDesktop = 0;
pwstrDesktop++;
pwstrWinsta = DesktopPath->Buffer;
}
@@ -245,7 +245,7 @@
{
pwstrDesktop = DesktopPath->Buffer;
pwstrWinsta = NULL;
- }
+ }
TRACE("IntParseDesktopPath pwstrWinsta:%S pwstrDesktop:%S\n",
pwstrWinsta, pwstrDesktop);
}
@@ -279,7 +279,7 @@
if(!pwstrDesktop)
pwstrDesktop = L"Default";
}
-
+
if(*hWinSta == NULL)
{
swprintf(wstrWinstaFullName, L"%wZ\\%ws", &gustrWindowStationsDir,
pwstrWinsta);
@@ -371,7 +371,7 @@
(PVOID*)Object,
NULL);
- TRACE("IntValidateDesktopHandle: handle:0x%x obj:0x%x access:0x%x
Status:0x%x\n",
+ TRACE("IntValidateDesktopHandle: handle:0x%x obj:0x%x access:0x%x
Status:0x%x\n",
Desktop, *Object, DesiredAccess, Status);
if (!NT_SUCCESS(Status))
@@ -1042,7 +1042,7 @@
/*
* Try to open already existing desktop
*/
-
+
Status = ObOpenObjectByName(
ObjectAttributes,
ExDesktopObjectType,
@@ -1087,7 +1087,7 @@
KernelMode,
(PVOID)&DesktopObject,
NULL);
- if (!NT_SUCCESS(Status))
+ if (!NT_SUCCESS(Status))
{
ERR("Failed to reference desktop object\n");
RETURN(NULL);
@@ -1243,7 +1243,7 @@
{
ExFreePoolWithTag(DesktopName.Buffer, TAG_STRING);
}
- if (!NoHooks && ptiCurrent)
+ if (!NoHooks && ptiCurrent)
{
ptiCurrent->TIF_flags &= ~TIF_DISABLEHOOKS;
ptiCurrent->pClientInfo->dwTIFlags = ptiCurrent->TIF_flags;
@@ -1355,7 +1355,7 @@
dwDesiredAccess,
ExDesktopObjectType,
UserMode,
- &hdesk);
+ (PHANDLE)&hdesk);
ObDereferenceObject(pdesk);
@@ -1818,12 +1818,12 @@
return FALSE;
}
}
-
+
pdeskOld = pti->rpdesk;
hdeskOld = pti->hdesk;
pctiOld = pti->pcti;
- /* do the switch */
+ /* do the switch */
if(pdesk != NULL)
{
pti->rpdesk = pdesk;
@@ -1855,7 +1855,7 @@
pci->pDeskInfo = NULL;
pci->pClientThreadInfo = NULL;
}
-
+
/* clean up the old desktop */
if(pdeskOld != NULL)
{
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] Wed May 2 19:29:33 2012
@@ -15,7 +15,7 @@
typedef struct _HOOKPACK
{
- PHOOK pHk;
+ PHOOK pHk;
LPARAM lParam;
PVOID pHookStructs;
} HOOKPACK, *PHOOKPACK;
@@ -42,7 +42,7 @@
{
if(!Unload && !(ppi->W32PF_flags & W32PF_APIHOOKLOADED))
{
- /* A callback in user mode can trigger UserLoadApiHook to be called and
+ /* A callback in user mode can trigger UserLoadApiHook to be called and
as a result IntLoadHookModule will be called recursively.
To solve this we set the flag that means that the appliaction has
loaded the api hook before the callback and in case of error we remove it
*/
@@ -80,11 +80,11 @@
}
/*
-IntHookModuleUnloaded:
-Sends a internal message to all threads of the requested desktop
-and notifies them that a global hook was destroyed
-and an injected module must be unloaded.
-As a result, IntLoadHookModule will be called for all the threads that
+IntHookModuleUnloaded:
+Sends a internal message to all threads of the requested desktop
+and notifies them that a global hook was destroyed
+and an injected module must be unloaded.
+As a result, IntLoadHookModule will be called for all the threads that
will receive the special purpose internal message.
*/
BOOL
@@ -106,7 +106,7 @@
/* FIXME: Do some more security checks here */
/* FIXME: The first check is a reactos specific hack for system threads */
- if(!PsIsSystemProcess(ptiCurrent->ppi->peProcess) &&
+ if(!PsIsSystemProcess(ptiCurrent->ppi->peProcess) &&
ptiCurrent->ppi != ppiCsr)
{
if(ptiCurrent->ppi->W32PF_flags & W32PF_APIHOOKLOADED)
@@ -129,8 +129,8 @@
return TRUE;
}
-BOOL
-FASTCALL
+BOOL
+FASTCALL
UserLoadApiHook()
{
return IntLoadHookModule(WH_APIHOOK, 0, FALSE);
@@ -436,7 +436,7 @@
break;
case HCBT_ACTIVATE:
- Size = sizeof(CBTACTIVATESTRUCT);
+ Size = sizeof(CBTACTIVATESTRUCT);
break;
case HCBT_CREATEWND: /* Handle ANSI? */
@@ -876,8 +876,8 @@
}
}
- if (!BadChk)
- {
+ if (!BadChk)
+ {
lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)(lParam ?
&EventMsg : NULL));
if (lParam)
@@ -917,14 +917,14 @@
case WH_FOREGROUNDIDLE:
case WH_KEYBOARD:
case WH_SHELL:
- lResult = co_HOOK_CallHookNext(Hook, Code, wParam, lParam);
+ lResult = co_HOOK_CallHookNext(Hook, Code, wParam, lParam);
break;
default:
ERR("Unsupported HOOK Id -> %d\n",Hook->HookId);
break;
}
- return lResult;
+ return lResult;
}
PHOOK
@@ -932,7 +932,7 @@
IntGetHookObject(HHOOK hHook)
{
PHOOK Hook;
-
+
if (!hHook)
{
EngSetLastError(ERROR_INVALID_HOOK_HANDLE);
@@ -1274,7 +1274,7 @@
continue;
}
UserRefObjectCo(Hook, &Ref);
-
+
/* Hook->Thread is null, we hax around this with Hook->head.pti. */
ptiHook = Hook->head.pti;
@@ -1421,7 +1421,7 @@
HHOOK
APIENTRY
-NtUserSetWindowsHookAW( int idHook,
+NtUserSetWindowsHookAW( int idHook,
HOOKPROC lpfn,
BOOL Ansi)
{
@@ -1523,7 +1523,7 @@
RETURN( NULL);
}
- if ( (ptiHook->TIF_flags & (TIF_CSRSSTHREAD|TIF_SYSTEMTHREAD))
&&
+ if ( (ptiHook->TIF_flags & (TIF_CSRSSTHREAD|TIF_SYSTEMTHREAD))
&&
(HookId == WH_GETMESSAGE ||
HookId == WH_CALLWNDPROC ||
HookId == WH_CBT ||
@@ -1539,7 +1539,7 @@
}
}
else /* System-global hook */
- {
+ {
ptiHook = pti; // gptiCurrent;
if ( !Mod &&
(HookId == WH_GETMESSAGE ||
@@ -1570,7 +1570,7 @@
}
ObDereferenceObject(WinStaObj);
- Hook = UserCreateObject(gHandleTable, NULL, &Handle, otHook, sizeof(HOOK));
+ Hook = UserCreateObject(gHandleTable, NULL, (PHANDLE)&Handle, otHook,
sizeof(HOOK));
if (!Hook)
{
Modified: trunk/reactos/win32ss/user/ntuser/keyboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/keyboa…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/keyboard.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/keyboard.c [iso-8859-1] Wed May 2 19:29:33 2012
@@ -750,7 +750,7 @@
if (hbm)
GreDeleteObject(hbm);
if (hdc)
- UserReleaseDC(hWnd, hdc, FALSE);
+ UserReleaseDC(pWnd, hdc, FALSE);
}
/*
Modified: trunk/reactos/win32ss/user/ntuser/misc/registry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/misc/r…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/misc/registry.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/misc/registry.c [iso-8859-1] Wed May 2 19:29:33
2012
@@ -33,7 +33,7 @@
NULL);
/* Open the key */
- Status = ZwOpenKey(&hkey, KEY_READ, &ObjectAttributes);
+ Status = ZwOpenKey((PHANDLE)&hkey, KEY_READ, &ObjectAttributes);
if (NT_SUCCESS(Status))
{
*phkey = hkey;
@@ -198,7 +198,7 @@
NULL);
/* Open the key */
- Status = ZwOpenKey(&hkey, KEY_READ, &ObjectAttributes);
+ Status = ZwOpenKey((PHANDLE)&hkey, KEY_READ, &ObjectAttributes);
if (!NT_SUCCESS(Status))
{
return FALSE;
@@ -292,7 +292,7 @@
Status = RtlAppendUnicodeToString(&usKeyName, pwszKeyName);
if (!NT_SUCCESS(Status))
{
- DPRINT1("RtlAppendUnicodeToString failed with Status=%lx, buf:%d,%d\n",
+ DPRINT1("RtlAppendUnicodeToString failed with Status=%lx,
buf:%d,%d\n",
Status, usKeyName.Length, usKeyName.MaximumLength);
return FALSE;
}
@@ -305,7 +305,7 @@
NULL);
/* Open or create the key */
- Status = ZwCreateKey(&hkey,
+ Status = ZwCreateKey((PHANDLE)&hkey,
KEY_READ | KEY_WRITE,
&ObjectAttributes,
0,
Modified: trunk/reactos/win32ss/user/ntuser/msgqueue.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/msgque…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/msgqueue.c [iso-8859-1] Wed May 2 19:29:33 2012
@@ -117,7 +117,7 @@
/* Get the screen DC */
if(!(hdcScreen = IntGetScreenDC()))
{
- return (HCURSOR)0;
+ return NULL;
}
OldCursor = MessageQueue->CursorObject;
@@ -517,7 +517,7 @@
if (co_HOOK_CallHooks(WH_MOUSE_LL, HC_ACTION, Msg->message, (LPARAM)
&MouseHookData))
return;
}
-
+
/* Get the desktop window */
pwndDesktop = UserGetDesktopWindow();
if (!pwndDesktop) return;
@@ -1727,8 +1727,8 @@
3: handle to the window whose messages are to be retrieved.
*/
if ( ( !Window || // 1
- ( Window == HWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) ||
// 2
- ( Window != HWND_BOTTOM && Window->head.h ==
CurrentMessage->Msg.hwnd ) ) && // 3
+ ( Window->head.h == HWND_BOTTOM && CurrentMessage->Msg.hwnd ==
NULL ) || // 2
+ ( Window->head.h != HWND_BOTTOM && Window->head.h ==
CurrentMessage->Msg.hwnd ) ) && // 3
( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) &&
CurrentMessage->QS_Flags & QSflags ) ||
( MsgFilterLow <= CurrentMessage->Msg.message &&
MsgFilterHigh >= CurrentMessage->Msg.message ) ) )
{
@@ -1790,8 +1790,8 @@
3: handle to the window whose messages are to be retrieved.
*/
if ( ( !Window || // 1
- ( Window == HWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) ||
// 2
- ( Window != HWND_BOTTOM && Window->head.h ==
CurrentMessage->Msg.hwnd ) ) && // 3
+ ( Window->head.h == HWND_BOTTOM && CurrentMessage->Msg.hwnd ==
NULL ) || // 2
+ ( Window->head.h != HWND_BOTTOM && Window->head.h ==
CurrentMessage->Msg.hwnd ) ) && // 3
( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) &&
CurrentMessage->QS_Flags & QSflags ) ||
( MsgFilterLow <= CurrentMessage->Msg.message &&
MsgFilterHigh >= CurrentMessage->Msg.message ) ) )
{
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] Wed May 2 19:29:33 2012
@@ -188,7 +188,7 @@
RtlZeroMemory(psmwp->acvr, count * sizeof(CVR));
psmwp->bHandle = TRUE;
psmwp->ccvr = 0; // actualCount
- psmwp->ccvrAlloc = count; // suggestedCount
+ psmwp->ccvrAlloc = count; // suggestedCount
RETURN((DWORD_PTR)hDwp);
}
@@ -634,7 +634,7 @@
UserRefObjectCo(Window, &Ref);
HelpId = IntGetProp(Window, gpsi->atomContextHelpIdProp);
-
+
UserDerefObjectCo(Window);
UserLeave();
return (DWORD)HelpId->Data;
@@ -665,7 +665,7 @@
switch (Routine)
{
case HWNDPARAM_ROUTINE_KILLSYSTEMTIMER:
- return IntKillTimer(hWnd, (UINT_PTR)Param, TRUE);
+ return IntKillTimer(UserGetWindowObject(hWnd), (UINT_PTR)Param, TRUE);
case HWNDPARAM_ROUTINE_SETWNDCONTEXTHLPID:
{
@@ -702,7 +702,7 @@
UserRefObjectCo(pWnd, &Ref);
if (pWnd->head.pti->ppi == PsGetCurrentProcessWin32Process() &&
- pWnd->cbwndExtra == DLGWINDOWEXTRA &&
+ pWnd->cbwndExtra == DLGWINDOWEXTRA &&
!(pWnd->state & WNDS_SERVERSIDEWINDOWPROC))
{
if (Param)
@@ -716,7 +716,7 @@
pWnd->state &= ~WNDS_DIALOGWINDOW;
}
}
-
+
UserDerefObjectCo(pWnd);
UserLeave();
return 0;