diff --git a/reactos/win32ss/gdi/eng/engbrush.c b/reactos/win32ss/gdi/eng/engbrush.c index 0fb8f5310d6..6721094cd5c 100644 --- a/reactos/win32ss/gdi/eng/engbrush.c +++ b/reactos/win32ss/gdi/eng/engbrush.c @@ -165,7 +165,7 @@ EngRealizeBrush( psurfRealize = SURFACE_ShareLockSurface(hbmpRealize); /* Already delete the pattern bitmap (will be kept until dereferenced) */ - EngDeleteSurface(hbmpRealize); + EngDeleteSurface((HSURF)hbmpRealize); if (!psurfRealize) { diff --git a/reactos/win32ss/gdi/eng/mouse.c b/reactos/win32ss/gdi/eng/mouse.c index ff3e36b172e..78f851f81dd 100644 --- a/reactos/win32ss/gdi/eng/mouse.c +++ b/reactos/win32ss/gdi/eng/mouse.c @@ -477,11 +477,11 @@ EngSetPointerShape( 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; diff --git a/reactos/win32ss/gdi/eng/pdevobj.c b/reactos/win32ss/gdi/eng/pdevobj.c index b13963ecc5d..5b3771f6204 100644 --- a/reactos/win32ss/gdi/eng/pdevobj.c +++ b/reactos/win32ss/gdi/eng/pdevobj.c @@ -832,7 +832,7 @@ NtGdiGetDhpdev( 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; diff --git a/reactos/win32ss/gdi/ntgdi/bitblt.c b/reactos/win32ss/gdi/ntgdi/bitblt.c index 43c840070e2..d6459f4cfbb 100644 --- a/reactos/win32ss/gdi/ntgdi/bitblt.c +++ b/reactos/win32ss/gdi/ntgdi/bitblt.c @@ -138,7 +138,7 @@ NtGdiAlphaBlend( 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 @@ NtGdiTransparentBlt( 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 @@ NtGdiMaskBlt( 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 @@ GreStretchBltMask( 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); diff --git a/reactos/win32ss/gdi/ntgdi/region.c b/reactos/win32ss/gdi/ntgdi/region.c index d9965d8ead6..d2e9245aa20 100644 --- a/reactos/win32ss/gdi/ntgdi/region.c +++ b/reactos/win32ss/gdi/ntgdi/region.c @@ -3346,7 +3346,7 @@ NtGdiCombineRgn( 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); diff --git a/reactos/win32ss/pch.h b/reactos/win32ss/pch.h index 8abe0049db2..9a16fa050e8 100644 --- a/reactos/win32ss/pch.h +++ b/reactos/win32ss/pch.h @@ -11,6 +11,7 @@ /* INCLUDES ******************************************************************/ #define _NO_COM +#define STRICT /* DDK/NDK/SDK headers */ #undef NTDDI_VERSION diff --git a/reactos/win32ss/reactx/ntddraw/dxeng.c b/reactos/win32ss/reactx/ntddraw/dxeng.c index 1022350c5c2..633949abe9a 100644 --- a/reactos/win32ss/reactx/ntddraw/dxeng.c +++ b/reactos/win32ss/reactx/ntddraw/dxeng.c @@ -533,7 +533,7 @@ DxEngLockHdev(HDEV hDev) DPRINT1("hDev : 0x%08lx\n",hDev); - Resource = ppdev->hsemDevLock; + Resource = (PERESOURCE)ppdev->hsemDevLock; if (Resource) { @@ -564,7 +564,7 @@ APIENTRY 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 @@ BOOLEAN 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(); } diff --git a/reactos/win32ss/user/ntuser/caret.c b/reactos/win32ss/user/ntuser/caret.c index 7ab4db11503..321cdbf44a1 100644 --- a/reactos/win32ss/user/ntuser/caret.c +++ b/reactos/win32ss/user/ntuser/caret.c @@ -1,4 +1,4 @@ -/* +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Win32k subsystem * PURPOSE: Caret functions @@ -164,7 +164,8 @@ BOOL FASTCALL co_UserHideCaret(PWND Window OPTIONAL) 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 @@ NtUserCreateCaret( if (ThreadQueue->CaretInfo->Visible) { - IntKillTimer(hWnd, IDCARETTIMER, TRUE); + PWND pwnd = UserGetWindowObject(hWnd); + IntKillTimer(pwnd, IDCARETTIMER, TRUE); co_IntHideCaret(ThreadQueue->CaretInfo); } diff --git a/reactos/win32ss/user/ntuser/class.c b/reactos/win32ss/user/ntuser/class.c index f54626dae8a..60993f56cf6 100644 --- a/reactos/win32ss/user/ntuser/class.c +++ b/reactos/win32ss/user/ntuser/class.c @@ -15,7 +15,7 @@ REGISTER_SYSCLASS DefaultServerClasses[] = CS_GLOBALCLASS|CS_DBLCLKS, NULL, 0, - IDC_ARROW, + (HICON)IDC_ARROW, (HBRUSH)(COLOR_BACKGROUND + 1), FNID_DESKTOP, ICLS_DESKTOP @@ -24,7 +24,7 @@ REGISTER_SYSCLASS DefaultServerClasses[] = 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 @@ REGISTER_SYSCLASS DefaultServerClasses[] = 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 @@ REGISTER_SYSCLASS DefaultServerClasses[] = 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 @@ REGISTER_SYSCLASS DefaultServerClasses[] = 0, NULL, // Use User32 procs 0, - IDC_ARROW, + (HICON)IDC_ARROW, 0, FNID_ICONTITLE, ICLS_ICONTITLE @@ -60,7 +60,7 @@ REGISTER_SYSCLASS DefaultServerClasses[] = CS_GLOBALCLASS, NULL, // Use User32 procs 0, - IDC_ARROW, + (HICON)IDC_ARROW, NULL, FNID_MESSAGEWND, ICLS_HWNDMESSAGE diff --git a/reactos/win32ss/user/ntuser/clipboard.c b/reactos/win32ss/user/ntuser/clipboard.c index 4bbbb740c9c..96881660c89 100644 --- a/reactos/win32ss/user/ntuser/clipboard.c +++ b/reactos/win32ss/user/ntuser/clipboard.c @@ -173,7 +173,7 @@ IntSynthesizeDib(PWINSTATION_OBJECT pWinStaObj, HBITMAP hBm) { 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 @@ BOOL APIENTRY NtUserCloseClipboard(VOID) { BOOL bRet; - + UserEnterExclusive(); bRet = UserCloseClipboard(); UserLeave(); @@ -714,7 +714,7 @@ NtUserGetPriorityClipboardFormat(UINT *paFormatPriorityList, INT cFormats) pWinStaObj = IntGetWinStaForCbAccess(); if (!pWinStaObj) goto cleanup; - + if (pWinStaObj->pClipBase == NULL) { iRet = 0; @@ -1002,7 +1002,7 @@ NtUserSetClipboardViewer(HWND hWndNewViewer) cleanup: if(pWinStaObj) ObDereferenceObject(pWinStaObj); - + UserLeave(); return hWndNext; diff --git a/reactos/win32ss/user/ntuser/desktop.c b/reactos/win32ss/user/ntuser/desktop.c index d4459827958..7fbb0186e89 100644 --- a/reactos/win32ss/user/ntuser/desktop.c +++ b/reactos/win32ss/user/ntuser/desktop.c @@ -237,7 +237,7 @@ IntParseDesktopPath(PEPROCESS Process, pwstrDesktop = wcschr(DesktopPath->Buffer, L'\\'); if(pwstrDesktop != NULL) { - *pwstrDesktop = 0; + *pwstrDesktop = 0; pwstrDesktop++; pwstrWinsta = DesktopPath->Buffer; } @@ -245,7 +245,7 @@ IntParseDesktopPath(PEPROCESS Process, { pwstrDesktop = DesktopPath->Buffer; pwstrWinsta = NULL; - } + } TRACE("IntParseDesktopPath pwstrWinsta:%S pwstrDesktop:%S\n", pwstrWinsta, pwstrDesktop); } @@ -279,7 +279,7 @@ IntParseDesktopPath(PEPROCESS Process, if(!pwstrDesktop) pwstrDesktop = L"Default"; } - + if(*hWinSta == NULL) { swprintf(wstrWinstaFullName, L"%wZ\\%ws", &gustrWindowStationsDir, pwstrWinsta); @@ -371,7 +371,7 @@ IntValidateDesktopHandle( (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 @@ NtUserCreateDesktop( /* * Try to open already existing desktop */ - + Status = ObOpenObjectByName( ObjectAttributes, ExDesktopObjectType, @@ -1087,7 +1087,7 @@ NtUserCreateDesktop( 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 @@ CLEANUP: { 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 @@ NtUserOpenInputDesktop( dwDesiredAccess, ExDesktopObjectType, UserMode, - &hdesk); + (PHANDLE)&hdesk); ObDereferenceObject(pdesk); @@ -1818,12 +1818,12 @@ IntSetThreadDesktop(IN HDESK hDesktop, 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 @@ IntSetThreadDesktop(IN HDESK hDesktop, pci->pDeskInfo = NULL; pci->pClientThreadInfo = NULL; } - + /* clean up the old desktop */ if(pdeskOld != NULL) { diff --git a/reactos/win32ss/user/ntuser/hook.c b/reactos/win32ss/user/ntuser/hook.c index d5266f699d2..bd664505e3f 100644 --- a/reactos/win32ss/user/ntuser/hook.c +++ b/reactos/win32ss/user/ntuser/hook.c @@ -15,7 +15,7 @@ DBG_DEFAULT_CHANNEL(UserHook); typedef struct _HOOKPACK { - PHOOK pHk; + PHOOK pHk; LPARAM lParam; PVOID pHookStructs; } HOOKPACK, *PHOOKPACK; @@ -42,7 +42,7 @@ IntLoadHookModule(int iHookID, HHOOK hHook, BOOL Unload) { 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 @@ IntLoadHookModule(int iHookID, HHOOK hHook, BOOL Unload) } /* -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 @@ IntHookModuleUnloaded(PDESKTOP pdesk, int iHookID, HHOOK hHook) /* 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 @@ IntHookModuleUnloaded(PDESKTOP pdesk, int iHookID, HHOOK hHook) return TRUE; } -BOOL -FASTCALL +BOOL +FASTCALL UserLoadApiHook() { return IntLoadHookModule(WH_APIHOOK, 0, FALSE); @@ -436,7 +436,7 @@ co_IntCallDebugHook(PHOOK Hook, break; case HCBT_ACTIVATE: - Size = sizeof(CBTACTIVATESTRUCT); + Size = sizeof(CBTACTIVATESTRUCT); break; case HCBT_CREATEWND: /* Handle ANSI? */ @@ -876,8 +876,8 @@ co_UserCallNextHookEx(PHOOK Hook, } } - if (!BadChk) - { + if (!BadChk) + { lResult = co_HOOK_CallHookNext(Hook, Code, wParam, (LPARAM)(lParam ? &EventMsg : NULL)); if (lParam) @@ -917,14 +917,14 @@ co_UserCallNextHookEx(PHOOK Hook, 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 @@ FASTCALL IntGetHookObject(HHOOK hHook) { PHOOK Hook; - + if (!hHook) { EngSetLastError(ERROR_INVALID_HOOK_HANDLE); @@ -1274,7 +1274,7 @@ co_HOOK_CallHooks( INT HookId, continue; } UserRefObjectCo(Hook, &Ref); - + /* Hook->Thread is null, we hax around this with Hook->head.pti. */ ptiHook = Hook->head.pti; @@ -1421,7 +1421,7 @@ CLEANUP: HHOOK APIENTRY -NtUserSetWindowsHookAW( int idHook, +NtUserSetWindowsHookAW( int idHook, HOOKPROC lpfn, BOOL Ansi) { @@ -1523,7 +1523,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, 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 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, } } else /* System-global hook */ - { + { ptiHook = pti; // gptiCurrent; if ( !Mod && (HookId == WH_GETMESSAGE || @@ -1570,7 +1570,7 @@ NtUserSetWindowsHookEx( HINSTANCE Mod, } ObDereferenceObject(WinStaObj); - Hook = UserCreateObject(gHandleTable, NULL, &Handle, otHook, sizeof(HOOK)); + Hook = UserCreateObject(gHandleTable, NULL, (PHANDLE)&Handle, otHook, sizeof(HOOK)); if (!Hook) { diff --git a/reactos/win32ss/user/ntuser/keyboard.c b/reactos/win32ss/user/ntuser/keyboard.c index 5267bb1c9db..8bb6b8b705c 100644 --- a/reactos/win32ss/user/ntuser/keyboard.c +++ b/reactos/win32ss/user/ntuser/keyboard.c @@ -750,7 +750,7 @@ cleanup: if (hbm) GreDeleteObject(hbm); if (hdc) - UserReleaseDC(hWnd, hdc, FALSE); + UserReleaseDC(pWnd, hdc, FALSE); } /* diff --git a/reactos/win32ss/user/ntuser/misc/registry.c b/reactos/win32ss/user/ntuser/misc/registry.c index 9dd6e3f8854..b7401a1e08f 100644 --- a/reactos/win32ss/user/ntuser/misc/registry.c +++ b/reactos/win32ss/user/ntuser/misc/registry.c @@ -33,7 +33,7 @@ RegOpenKey( 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 @@ RegReadUserSetting( 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 @@ RegWriteUserSetting( 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 @@ RegWriteUserSetting( NULL); /* Open or create the key */ - Status = ZwCreateKey(&hkey, + Status = ZwCreateKey((PHANDLE)&hkey, KEY_READ | KEY_WRITE, &ObjectAttributes, 0, diff --git a/reactos/win32ss/user/ntuser/msgqueue.c b/reactos/win32ss/user/ntuser/msgqueue.c index 9914df71fdd..0cb9e49f95c 100644 --- a/reactos/win32ss/user/ntuser/msgqueue.c +++ b/reactos/win32ss/user/ntuser/msgqueue.c @@ -117,7 +117,7 @@ UserSetCursor( /* Get the screen DC */ if(!(hdcScreen = IntGetScreenDC())) { - return (HCURSOR)0; + return NULL; } OldCursor = MessageQueue->CursorObject; @@ -517,7 +517,7 @@ co_MsqInsertMouseMessage(MSG* Msg, DWORD flags, ULONG_PTR dwExtraInfo, BOOL Hook 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 @@ co_MsqPeekHardwareMessage(IN PUSER_MESSAGE_QUEUE MessageQueue, 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 @@ MsqPeekMessage(IN PUSER_MESSAGE_QUEUE MessageQueue, 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 ) ) ) { diff --git a/reactos/win32ss/user/ntuser/simplecall.c b/reactos/win32ss/user/ntuser/simplecall.c index 7b0bdca7bff..614ddcf6eaf 100644 --- a/reactos/win32ss/user/ntuser/simplecall.c +++ b/reactos/win32ss/user/ntuser/simplecall.c @@ -188,7 +188,7 @@ NtUserCallOneParam( 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 @@ NtUserCallHwnd( UserRefObjectCo(Window, &Ref); HelpId = IntGetProp(Window, gpsi->atomContextHelpIdProp); - + UserDerefObjectCo(Window); UserLeave(); return (DWORD)HelpId->Data; @@ -665,7 +665,7 @@ NtUserCallHwndParam( 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 @@ NtUserCallHwndParam( 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 @@ NtUserCallHwndParam( pWnd->state &= ~WNDS_DIALOGWINDOW; } } - + UserDerefObjectCo(pWnd); UserLeave(); return 0;