Author: tkreuzer Date: Sat Oct 6 20:15:36 2012 New Revision: 57505
URL: http://svn.reactos.org/svn/reactos?rev=57505&view=rev Log: [WIN32K] Use ExAllocatePoolWithTag instead of ExAllocatePool
Modified: trunk/reactos/win32ss/drivers/videoprt/dispatch.c trunk/reactos/win32ss/drivers/videoprt/videoprt.h trunk/reactos/win32ss/gdi/eng/engevent.c trunk/reactos/win32ss/gdi/eng/mem.c trunk/reactos/win32ss/gdi/eng/surface.c trunk/reactos/win32ss/gdi/ntgdi/dibobj.c trunk/reactos/win32ss/gdi/ntgdi/fillshap.c trunk/reactos/win32ss/gdi/ntgdi/freetype.c trunk/reactos/win32ss/gdi/ntgdi/gdidbg.c trunk/reactos/win32ss/gdi/ntgdi/region.c trunk/reactos/win32ss/user/ntuser/class.c trunk/reactos/win32ss/user/ntuser/defwnd.c trunk/reactos/win32ss/user/ntuser/desktop.c trunk/reactos/win32ss/user/ntuser/focus.c trunk/reactos/win32ss/user/ntuser/menu.c trunk/reactos/win32ss/user/ntuser/painting.c trunk/reactos/win32ss/user/ntuser/scrollbar.c trunk/reactos/win32ss/user/ntuser/window.c trunk/reactos/win32ss/user/ntuser/winpos.c trunk/reactos/win32ss/user/ntuser/winsta.c
Modified: trunk/reactos/win32ss/drivers/videoprt/dispatch.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/di... ============================================================================== --- trunk/reactos/win32ss/drivers/videoprt/dispatch.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/drivers/videoprt/dispatch.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -205,7 +205,9 @@ DriverExtension = DeviceExtension->DriverExtension;
/* Translate the IRP to a VRP */ - vrp = ExAllocatePool(NonPagedPool, sizeof(VIDEO_REQUEST_PACKET)); + vrp = ExAllocatePoolWithTag(NonPagedPool, + sizeof(VIDEO_REQUEST_PACKET), + TAG_REQUEST_PACKET); if (NULL == vrp) { return STATUS_NO_MEMORY; @@ -228,7 +230,7 @@ vrp);
/* Free the VRP */ - ExFreePool(vrp); + ExFreePoolWithTag(vrp, TAG_REQUEST_PACKET);
INFO_(VIDEOPRT, "- Returned status: %x\n", Irp->IoStatus.Status);
@@ -561,7 +563,7 @@ IN PIRP Irp) { PVIDEO_PORT_COMMON_EXTENSION CommonExtension = DeviceObject->DeviceExtension; - + if (CommonExtension->Fdo) return IntVideoPortDispatchFdoPnp(DeviceObject, Irp); else
Modified: trunk/reactos/win32ss/drivers/videoprt/videoprt.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/vi... ============================================================================== --- trunk/reactos/win32ss/drivers/videoprt/videoprt.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/drivers/videoprt/videoprt.h [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -44,6 +44,7 @@
#define TAG_VIDEO_PORT 'PDIV' #define TAG_VIDEO_PORT_BUFFER '\0mpV' +#define TAG_REQUEST_PACKET 'qRpV'
typedef struct _VIDEO_PORT_ADDRESS_MAPPING {
Modified: trunk/reactos/win32ss/gdi/eng/engevent.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engevent.c?... ============================================================================== --- trunk/reactos/win32ss/gdi/eng/engevent.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/eng/engevent.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -67,7 +67,7 @@ }
/* Free the allocated memory */ - ExFreePool(Event); + ExFreePoolWithTag(Event, GDITAG_ENG_EVENT);
/* Return success */ return TRUE; @@ -136,7 +136,7 @@ else { /* Free the allocation */ - ExFreePool(EngEvent); + ExFreePoolWithTag(EngEvent, GDITAG_ENG_EVENT); EngEvent = NULL; }
@@ -156,7 +156,7 @@ ObDereferenceObject(Event->pKEvent);
/* Free the Eng object */ - ExFreePool(Event); + ExFreePoolWithTag(Event, GDITAG_ENG_EVENT); return TRUE; }
Modified: trunk/reactos/win32ss/gdi/eng/mem.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/mem.c?rev=5... ============================================================================== --- trunk/reactos/win32ss/gdi/eng/mem.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/eng/mem.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -47,7 +47,8 @@ /* Windows allows to pass NULL */ if (pvBaseAddress) { - ExFreePool(pvBaseAddress); + /* Use 0 as tag, which equals a call to ExFreePool */ + ExFreePoolWithTag(pvBaseAddress, 0); } }
Modified: trunk/reactos/win32ss/gdi/eng/surface.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/surface.c?r... ============================================================================== --- trunk/reactos/win32ss/gdi/eng/surface.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/eng/surface.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -99,7 +99,7 @@ else if (psurf->SurfObj.fjBitmap & BMF_POOLALLOC) { /* Free a pool allocation */ - ExFreePool(pvBits); + EngFreeMem(pvBits); } }
Modified: trunk/reactos/win32ss/gdi/ntgdi/dibobj.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dibobj.c?... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/dibobj.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -557,7 +557,7 @@ if (hSourceBitmap) EngDeleteSurface((HSURF)hSourceBitmap); DC_UnlockDc(pDC); Exit2: - ExFreePool(pbmiSafe); + ExFreePoolWithTag(pbmiSafe, 'pmTG'); return ret; }
Modified: trunk/reactos/win32ss/gdi/ntgdi/fillshap.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/fillshap.... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/fillshap.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/fillshap.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -450,14 +450,14 @@ if (!dc) { EngSetLastError(ERROR_INVALID_HANDLE); - ExFreePool(pTemp); + ExFreePoolWithTag(pTemp, TAG_SHAPE); return FALSE; }
if (dc->dctype == DC_TYPE_INFO) { DC_UnlockDc(dc); - ExFreePool(pTemp); + ExFreePoolWithTag(pTemp, TAG_SHAPE); /* Yes, Windows really returns TRUE in this case */ return TRUE; } @@ -497,7 +497,7 @@ /* Cleanup and return */ DC_vFinishBlit(dc, NULL); DC_UnlockDc(dc); - ExFreePool(pTemp); + ExFreePoolWithTag(pTemp, TAG_SHAPE);
return (ULONG_PTR)Ret; }
Modified: trunk/reactos/win32ss/gdi/ntgdi/freetype.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/freetype.... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/freetype.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -1402,7 +1402,7 @@ NewEntry = (PFONT_CACHE_ENTRY)FontCacheListHead.Blink; FT_Done_Glyph((FT_Glyph)NewEntry->BitmapGlyph); RemoveTailList(&FontCacheListHead); - ExFreePool(NewEntry); + ExFreePoolWithTag(NewEntry, TAG_FONT); FontCacheNumEntries--; }
@@ -2584,7 +2584,7 @@ Score += 25; }
- ExFreePool(Otm); + ExFreePoolWithTag(Otm, GDITAG_TEXT);
return Score; } @@ -2850,7 +2850,7 @@ /* Get the full path name */ if (!IntGetFullFileName(NameInfo1, Size, FileName)) { - ExFreePool(NameInfo1); + ExFreePoolWithTag(NameInfo1, TAG_FINF); return FALSE; }
@@ -2858,7 +2858,7 @@ NameInfo2 = ExAllocatePoolWithTag(PagedPool, Size, TAG_FINF); if (!NameInfo2) { - ExFreePool(NameInfo1); + ExFreePoolWithTag(NameInfo1, TAG_FINF); EngSetLastError(ERROR_NOT_ENOUGH_MEMORY); return FALSE; } @@ -2888,7 +2888,7 @@ IntUnLockGlobalFonts;
/* Free the buffers */ - ExFreePool(NameInfo1); + ExFreePoolWithTag(NameInfo1, TAG_FINF); ExFreePool(NameInfo2);
if (!bFound && dwType != 5) @@ -3041,7 +3041,7 @@ if (! GetFontFamilyInfoForList(&LogFont, Info, &Count, Size, &FontListHead) ) { IntUnLockGlobalFonts; - ExFreePool(Info); + ExFreePoolWithTag(Info, GDITAG_TEXT); return -1; } IntUnLockGlobalFonts; @@ -3053,7 +3053,7 @@ &Win32Process->PrivateFontListHead)) { IntUnLockProcessPrivateFonts(Win32Process); - ExFreePool(Info); + ExFreePoolWithTag(Info, GDITAG_TEXT); return -1; } IntUnLockProcessPrivateFonts(Win32Process); @@ -3061,7 +3061,7 @@ /* Enumerate font families in the registry */ if (! GetFontFamilyInfoForSubstitutes(&LogFont, Info, &Count, Size)) { - ExFreePool(Info); + ExFreePoolWithTag(Info, GDITAG_TEXT); return -1; }
@@ -3072,13 +3072,13 @@ (Count < Size ? Count : Size) * sizeof(FONTFAMILYINFO)); if (! NT_SUCCESS(Status)) { - ExFreePool(Info); + ExFreePoolWithTag(Info, GDITAG_TEXT); EngSetLastError(ERROR_INVALID_PARAMETER); return -1; } }
- ExFreePool(Info); + ExFreePoolWithTag(Info, GDITAG_TEXT);
return Count; } @@ -3778,7 +3778,7 @@ dc = DC_LockDc(hDC); if (dc == NULL) { - ExFreePool(SafeBuff); + ExFreePoolWithTag(SafeBuff, GDITAG_TEXT); EngSetLastError(ERROR_INVALID_HANDLE); return FALSE; } @@ -3789,7 +3789,7 @@
if (TextObj == NULL) { - ExFreePool(SafeBuff); + ExFreePoolWithTag(SafeBuff, GDITAG_TEXT); EngSetLastError(ERROR_INVALID_HANDLE); return FALSE; } @@ -3812,7 +3812,7 @@ if (!found) { DPRINT1("WARNING: Could not find desired charmap!\n"); - ExFreePool(SafeBuff); + ExFreePoolWithTag(SafeBuff, GDITAG_TEXT); EngSetLastError(ERROR_INVALID_HANDLE); return FALSE; } @@ -3880,10 +3880,10 @@ if (! NT_SUCCESS(Status)) { SetLastNtError(Status); - ExFreePool(SafeBuff); + ExFreePoolWithTag(SafeBuff, GDITAG_TEXT); return FALSE; } - ExFreePool(SafeBuff); + ExFreePoolWithTag(SafeBuff, GDITAG_TEXT); DPRINT("NtGdiGetCharABCWidths Worked!\n"); return TRUE; } @@ -3945,7 +3945,7 @@ dc = DC_LockDc(hDC); if (dc == NULL) { - ExFreePool(SafeBuff); + ExFreePoolWithTag(SafeBuff, GDITAG_TEXT); EngSetLastError(ERROR_INVALID_HANDLE); return FALSE; } @@ -3956,7 +3956,7 @@
if (TextObj == NULL) { - ExFreePool(SafeBuff); + ExFreePoolWithTag(SafeBuff, GDITAG_TEXT); EngSetLastError(ERROR_INVALID_HANDLE); return FALSE; } @@ -4021,7 +4021,7 @@ IntUnLockFreeType; TEXTOBJ_UnlockText(TextObj); MmCopyToCaller(Buffer, SafeBuff, BufferSize); - ExFreePool(SafeBuff); + ExFreePoolWithTag(SafeBuff, GDITAG_TEXT); return TRUE; }
@@ -4088,7 +4088,7 @@ } IntGetOutlineTextMetrics(FontGDI, Size, potm); DefChar = potm->otmTextMetrics.tmDefaultChar; // May need this. - ExFreePool(potm); + ExFreePoolWithTag(potm, GDITAG_TEXT); }
IntLockFreeType; @@ -4183,7 +4183,7 @@ } IntGetOutlineTextMetrics(FontGDI, Size, potm); DefChar = potm->otmTextMetrics.tmDefaultChar; // May need this. - ExFreePool(potm); + ExFreePoolWithTag(potm, GDITAG_TEXT); }
_SEH2_TRY
Modified: trunk/reactos/win32ss/gdi/ntgdi/gdidbg.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/gdidbg.c?... ============================================================================== --- trunk/reactos/win32ss/gdi/ntgdi/gdidbg.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/gdidbg.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -246,7 +246,7 @@ while (i) { pEntry = &GdiHandleTable->Entries[i]; - if (i > GDI_HANDLE_COUNT) + if (i >= GDI_HANDLE_COUNT) { DPRINT1("nDeleted=%lu\n", nDeleted); ASSERT(FALSE);
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] Sat Oct 6 20:15:36 2012 @@ -2882,7 +2882,7 @@ while (pSLLBlock) { tmpSLLBlock = pSLLBlock->next; - ExFreePool(pSLLBlock); + ExFreePoolWithTag(pSLLBlock, TAG_REGION); pSLLBlock = tmpSLLBlock; } }
Modified: trunk/reactos/win32ss/user/ntuser/class.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/class.c... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/class.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -1590,7 +1590,7 @@
if (Ansi && szTemp != NULL && szTemp != szStaticTemp) { - ExFreePool(szTemp); + ExFreePoolWithTag(szTemp, USERTAG_CLASS); }
return Ret;
Modified: trunk/reactos/win32ss/user/ntuser/defwnd.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/defwnd.... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/defwnd.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/defwnd.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -69,7 +69,7 @@ lResult = MCSR_SHUTDOWNFINISHED; } } - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); } if (List && (lResult == MCSR_DONOTSHUTDOWN)) return lResult; /*
Modified: trunk/reactos/win32ss/user/ntuser/desktop.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/desktop... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/desktop.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -742,7 +742,7 @@ (Message == HSHELL_LANGUAGE ? lParam : (LPARAM)wParam) ); }
- ExFreePool(HwndList); + ExFreePoolWithTag(HwndList, USERTAG_WINDOWLIST); }
if (ISITHOOKED(WH_SHELL)) @@ -802,7 +802,7 @@ if (Current->hWnd == hWnd) { RemoveEntryList(&Current->ListEntry); - ExFreePool(Current); + ExFreePoolWithTag(Current, TAG_WINSTA); return TRUE; } }
Modified: trunk/reactos/win32ss/user/ntuser/focus.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/focus.c... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/focus.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -153,10 +153,10 @@ List = IntWinListChildren(UserGetDesktopWindow()); if ( List ) { - if ( OldTID ) + if ( OldTID ) { ptiOld->TIF_flags |= TIF_INACTIVATEAPPMSG; - ptiOld->pClientInfo->dwTIFlags = ptiOld->TIF_flags; + ptiOld->pClientInfo->dwTIFlags = ptiOld->TIF_flags;
for (phWnd = List; *phWnd; ++phWnd) { @@ -186,13 +186,13 @@ } } } - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); } } if (WindowPrev) UserDerefObjectCo(WindowPrev); // Now allow the previous window to die.
- if (Window->state & WNDS_ACTIVEFRAME) + if (Window->state & WNDS_ACTIVEFRAME) { // If already active frame do not allow NCPaint. //ERR("SendActivateMessage Is Active Frame!\n"); Window->state |= WNDS_NONCPAINT; @@ -345,7 +345,7 @@ /* MSDN: The system restricts which processes can set the foreground window. A process - can set the foreground window only if one of the following conditions is true: + can set the foreground window only if one of the following conditions is true:
* The process is the foreground process. * The process was started by the foreground process. @@ -353,7 +353,7 @@ * There is no foreground process. * The foreground process is being debugged. * The foreground is not locked (see LockSetForegroundWindow). - * The foreground lock time-out has expired (see SPI_GETFOREGROUNDLOCKTIMEOUT in SystemParametersInfo). + * The foreground lock time-out has expired (see SPI_GETFOREGROUNDLOCKTIMEOUT in SystemParametersInfo). * No menus are active. */
@@ -404,7 +404,7 @@ ( CanForceFG(pti->ppi) || pti->TIF_flags & (TIF_SYSTEMTHREAD|TIF_CSRSSTHREAD|TIF_ALLOWFOREGROUNDACTIVATE) )) || pti->ppi == ppiScrnSaver ) - { + { IntSetFocusMessageQueue(Wnd->head.pti->MessageQueue); gptiForeground = Wnd->head.pti; TRACE("Set Foreground pti 0x%p Q 0x%p\n",Wnd->head.pti, Wnd->head.pti->MessageQueue); @@ -416,7 +416,7 @@ */ FindRemoveAsyncMsg(Wnd); // Do this to fix test_SFW todos! fgRet = TRUE; - } + }
// Fix FG Bounce with regedit. if (hWndPrev != hWnd ) @@ -655,7 +655,7 @@ if (!pwndTop->spwndParent || pwndTop->spwndParent == UserGetDesktopWindow()) { if ((pwndTop->style & (WS_POPUP|WS_CHILD)) == WS_CHILD) return 0; - break; + break; } if (pwndTop->spwndParent == UserGetMessageWindow()) return 0; pwndTop = pwndTop->spwndParent; @@ -781,7 +781,7 @@ return NULL; } } - + hWndPrev = MsqSetStateWindow(ThreadQueue, MSQ_STATE_CAPTURE, hWnd);
if (hWndPrev)
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 Oct 6 20:15:36 2012 @@ -152,7 +152,7 @@ }
/* Free memory */ - ExFreePool(MenuItem); + ExFreePoolWithTag(MenuItem, TAG_MENUITEM);
return TRUE; }
Modified: trunk/reactos/win32ss/user/ntuser/painting.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/paintin... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/painting.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/painting.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -386,7 +386,7 @@ UserDerefObjectCo(Wnd); } } - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); } } } @@ -505,7 +505,7 @@
if (Flags & RDW_VALIDATE && RgnType != NULLREGION) { - if (Flags & RDW_NOFRAME) + if (Flags & RDW_NOFRAME) Wnd->state &= ~WNDS_SENDNCPAINT; if (Flags & RDW_NOERASE) Wnd->state &= ~(WNDS_SENDERASEBACKGROUND|WNDS_ERASEBACKGROUND); @@ -1681,7 +1681,7 @@ dcxflags = DCX_USESTYLE;
if (!(Window->pcls->style & (CS_OWNDC|CS_CLASSDC))) - dcxflags |= DCX_CACHE; // AH??? wine~ If not Powned or with Class go Cheap! + dcxflags |= DCX_CACHE; // AH??? wine~ If not Powned or with Class go Cheap!
if (flags & SW_SCROLLCHILDREN && Window->style & WS_CLIPCHILDREN) dcxflags |= DCX_CACHE|DCX_NOCLIPCHILDREN; @@ -2053,7 +2053,7 @@ ERR("RealizePalette Desktop."); hdc = UserGetWindowDC(pWnd); IntPaintDesktop(hdc); - UserReleaseDC(pWnd,hdc,FALSE); + UserReleaseDC(pWnd,hdc,FALSE); } UserSendNotifyMessage((HWND)HWND_BROADCAST, WM_PALETTECHANGED, (WPARAM)hWnd, 0); }
Modified: trunk/reactos/win32ss/user/ntuser/scrollbar.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/scrollb... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/scrollbar.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/scrollbar.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -90,7 +90,7 @@ lprect->bottom += UserGetSystemMetrics (SM_CYHSCROLL); if (Wnd->style & WS_BORDER) { - lprect->left--; + lprect->left--; lprect->right++; } else if (Wnd->style & WS_VSCROLL) @@ -113,7 +113,7 @@ } if (Wnd->style & WS_BORDER) { - lprect->top--; + lprect->top--; lprect->bottom++; } else if (Wnd->style & WS_HSCROLL) @@ -618,7 +618,7 @@ { DesktopHeapFree(Window->head.rpdesk, Window->pSBInfo); Window->pSBInfo = NULL; - ExFreePool(Window->pSBInfoex); + ExFreePoolWithTag(Window->pSBInfoex, TAG_SBARINFO); Window->pSBInfoex = NULL; return TRUE; } @@ -802,7 +802,7 @@ { RtlCopyMemory(&psi, lpsi, sizeof(SCROLLINFO)); if (pSBData) - { + { RtlCopyMemory(&SBDataSafe, pSBData, sizeof(SBDATA)); } }
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 Oct 6 20:15:36 2012 @@ -304,7 +304,7 @@ Owner = Owner->spwndOwner; Depth++; } - return FALSE; + return FALSE; }
/*********************************************************************** @@ -473,7 +473,7 @@ UserDereferenceObject(Child); } } - ExFreePool(Children); + ExFreePoolWithTag(Children, USERTAG_WINDOWLIST); }
if(SendMessages) @@ -1206,7 +1206,7 @@
WndOldParent = Wnd->spwndParent;
- if ( WndOldParent && + if ( WndOldParent && WndOldParent->ExStyle & WS_EX_LAYOUTRTL) pt.x = Wnd->rcWindow.right; else @@ -1224,7 +1224,7 @@ /* Set the new parent */ Wnd->spwndParent = WndNewParent;
- if ( Wnd->style & WS_CHILD && + if ( Wnd->style & WS_CHILD && Wnd->spwndOwner && Wnd->spwndOwner->ExStyle & WS_EX_TOPMOST ) { @@ -1931,7 +1931,7 @@ if (!IntValidateOwnerDepth(pWnd, Owner)) { EngSetLastError(ERROR_INVALID_PARAMETER); - goto Error; + goto Error; } if ( pWnd->spwndOwner && pWnd->spwndOwner->ExStyle & WS_EX_TOPMOST ) @@ -2395,7 +2395,7 @@ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* Cleanup and fail */ - ExFreePool(pvBuffer); + ExFreePoolWithTag(pvBuffer, TAG_STRING); _SEH2_YIELD(return _SEH2_GetExceptionCode();) } _SEH2_END @@ -2682,7 +2682,7 @@ }
} - ExFreePool(Children); + ExFreePoolWithTag(Children, USERTAG_WINDOWLIST); } if (! GotOne) { @@ -2794,7 +2794,7 @@ } } } - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); }
return Ret; @@ -2987,7 +2987,7 @@ }
} - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); } } else @@ -4158,7 +4158,7 @@ }
} - ExFreePool( win_array ); + ExFreePoolWithTag(win_array, USERTAG_WINDOWLIST); TRACE("Leave ShowOwnedPopups\n"); return TRUE; }
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 Oct 6 20:15:36 2012 @@ -65,7 +65,7 @@ Rect->bottom = UserGetSystemMetrics(SM_CYMINIMIZED); return; } - if ( Wnd != UserGetDesktopWindow()) // Wnd->fnid != FNID_DESKTOP ) + if ( Wnd != UserGetDesktopWindow()) // Wnd->fnid != FNID_DESKTOP ) { *Rect = Wnd->rcClient; RECTL_vOffsetRect(Rect, -Wnd->rcClient.left, -Wnd->rcClient.top); @@ -177,7 +177,7 @@ BOOL FASTCALL ActivateOtherWindowMin(PWND Wnd) { BOOL ActivePrev, FindTopWnd; - PWND pWndTopMost, pWndChild, pWndSetActive, pWndTemp, pWndDesk; + PWND pWndTopMost, pWndChild, pWndSetActive, pWndTemp, pWndDesk; USER_REFERENCE_ENTRY Ref; PTHREADINFO pti = gptiCurrent;
@@ -398,7 +398,7 @@ //ERR("X:%d Y:%d\n",x,y); } } - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); return yspacing; }
@@ -431,7 +431,7 @@
//ERR("X:%d Y:%d XS:%d YS:%d\n",Pos->x,Pos->y,xspacing,yspacing);
- // Set to default position when minimized. + // Set to default position when minimized. Pos->x = x + UserGetSystemMetrics(SM_CXBORDER); Pos->y = y - yspacing - UserGetSystemMetrics(SM_CYBORDER);
@@ -752,7 +752,7 @@ switch (ShowFlag) { case SW_SHOWMINNOACTIVE: - case SW_SHOWMINIMIZED: + case SW_SHOWMINIMIZED: case SW_FORCEMINIMIZE: case SW_MINIMIZE: { @@ -1323,7 +1323,7 @@ hWndInsertAfter = List[i]; } } - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); }
return hWndInsertAfter; @@ -1637,7 +1637,7 @@ IntLinkWindow(Window, InsertAfterWindow); }
- if ( ( WinPos.hwndInsertAfter == HWND_TOPMOST || + if ( ( WinPos.hwndInsertAfter == HWND_TOPMOST || ( Window->ExStyle & WS_EX_TOPMOST && Window->spwndPrev && Window->spwndPrev->ExStyle & WS_EX_TOPMOST ) || ( Window->spwndNext && Window->spwndNext->ExStyle & WS_EX_TOPMOST ) ) && !bNoTopMost ) @@ -1932,7 +1932,7 @@ }
/* And last, send the WM_WINDOWPOSCHANGED message */ - + TRACE("\tstatus flags = %04x\n", WinPos.flags & SWP_AGG_STATUSFLAGS);
if ((WinPos.flags & SWP_AGG_STATUSFLAGS) != SWP_AGG_NOPOSCHANGE) @@ -2174,7 +2174,7 @@
/* We can't activate a child window */ if ((Wnd->style & WS_CHILD) && - !(Wnd->ExStyle & WS_EX_MDICHILD) && + !(Wnd->ExStyle & WS_EX_MDICHILD) && Cmd != SW_SHOWNA) { //ERR("SWP Child No active and ZOrder\n"); @@ -2297,12 +2297,12 @@ if(pwndChild != NULL) { /* We found a window. Don't send any more WM_NCHITTEST messages */ - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); UserDereferenceObject(ScopeWin); return pwndChild; } } - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); } }
@@ -2381,14 +2381,14 @@ if ( Child->pcls->atomClassName != gpsi->atomSysClass[ICLS_BUTTON] || (Child->style & BS_TYPEMASK) != BS_GROUPBOX ) { - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); return Child; } pwndHit = Child; } } } - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); } return pwndHit ? pwndHit : Parent; } @@ -2439,7 +2439,7 @@ } } } - ExFreePool(List); + ExFreePoolWithTag(List, USERTAG_WINDOWLIST); } return pwndHit ? pwndHit : Parent; }
Modified: trunk/reactos/win32ss/user/ntuser/winsta.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winsta.... ============================================================================== --- trunk/reactos/win32ss/user/ntuser/winsta.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winsta.c [iso-8859-1] Sat Oct 6 20:15:36 2012 @@ -1092,7 +1092,7 @@ { if (Buffer != InitialBuffer) { - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG_WINSTA); } return Status; } @@ -1107,7 +1107,7 @@ { if (Buffer != InitialBuffer) { - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG_WINSTA); } return Status; } @@ -1117,7 +1117,7 @@ { if (Buffer != InitialBuffer) { - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG_WINSTA); } return Status; } @@ -1129,7 +1129,7 @@ */ if (NULL != Buffer && Buffer != InitialBuffer) { - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG_WINSTA); }
return STATUS_SUCCESS;