[ros-diffs] [mjansen] 71949: [EXPLORER] HACK: ignore unimplemented SetBandSiteInfo. Patch by Wim Hueskes. CORE-9809 #resolve #comment Thanks!
Author: mjansen Date: Fri Jul 15 23:33:53 2016 New Revision: 71949 URL: http://svn.reactos.org/svn/reactos?rev=71949=rev Log: [EXPLORER] HACK: ignore unimplemented SetBandSiteInfo. Patch by Wim Hueskes. CORE-9809 #resolve #comment Thanks! Modified: trunk/reactos/base/shell/explorer/tbsite.cpp Modified: trunk/reactos/base/shell/explorer/tbsite.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/tbsite.cpp?rev=71949=71948=71949=diff == --- trunk/reactos/base/shell/explorer/tbsite.cpp[iso-8859-1] (original) +++ trunk/reactos/base/shell/explorer/tbsite.cpp[iso-8859-1] Fri Jul 15 23:33:53 2016 @@ -334,6 +334,13 @@ bsi.dwStyle = (Locked ? BSIS_LOCKED | BSIS_NOGRIPPER : BSIS_AUTOGRIPPER); hRet = m_BandSite->SetBandSiteInfo(); + +/* HACK for CORE-9809 ! */ +if (hRet == E_NOTIMPL) +hRet = S_OK; +else +ERR("HACK for CORE-9809 no longer needed!\n"); + if (SUCCEEDED(hRet)) { hRet = Update();
[ros-diffs] [hbelusca] 71948: [PSDK]: Add two missing flags concerning custom-drawn controls.
Author: hbelusca Date: Fri Jul 15 21:12:52 2016 New Revision: 71948 URL: http://svn.reactos.org/svn/reactos?rev=71948=rev Log: [PSDK]: Add two missing flags concerning custom-drawn controls. Modified: trunk/reactos/sdk/include/psdk/commctrl.h Modified: trunk/reactos/sdk/include/psdk/commctrl.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/psdk/commctrl.h?rev=71948=71947=71948=diff == --- trunk/reactos/sdk/include/psdk/commctrl.h [iso-8859-1] (original) +++ trunk/reactos/sdk/include/psdk/commctrl.h [iso-8859-1] Fri Jul 15 21:12:52 2016 @@ -253,6 +253,8 @@ #define CDRF_DODEFAULT 0x0 #define CDRF_NEWFONT 0x2 #define CDRF_SKIPDEFAULT 0x4 +#define CDRF_DOERASE 0x8 +#define CDRF_SKIPPOSTPAINT 0x100 #define CDRF_NOTIFYPOSTPAINT 0x10 #define CDRF_NOTIFYITEMDRAW 0x20
[ros-diffs] [akhaldi] 71947: [KERNEL32] Check the return buffer for NULL before initializing the unicode string buffer with it. By Peter Hater. CORE-11368
Author: akhaldi Date: Fri Jul 15 20:18:20 2016 New Revision: 71947 URL: http://svn.reactos.org/svn/reactos?rev=71947=rev Log: [KERNEL32] Check the return buffer for NULL before initializing the unicode string buffer with it. By Peter Hater. CORE-11368 Modified: trunk/reactos/dll/win32/kernel32/client/compname.c Modified: trunk/reactos/dll/win32/kernel32/client/compname.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/compname.c?rev=71947=71946=71947=diff == --- trunk/reactos/dll/win32/kernel32/client/compname.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/client/compname.c [iso-8859-1] Fri Jul 15 20:18:20 2016 @@ -263,8 +263,15 @@ UNICODE_STRING UnicodeString; ANSI_STRING AnsiString; BOOL Result; -PWCHAR TempBuffer = RtlAllocateHeap( RtlGetProcessHeap(), 0, *nSize * sizeof(WCHAR) ); - +PWCHAR TempBuffer; + +if (!lpBuffer) +{ +SetLastError(ERROR_INVALID_PARAMETER); +return FALSE; +} + +TempBuffer = RtlAllocateHeap(RtlGetProcessHeap(), 0, *nSize * sizeof(WCHAR)); if (!TempBuffer) { SetLastError(ERROR_NOT_ENOUGH_MEMORY);
[ros-diffs] [jimtabor] 71946: [NtGdi] - Make SetBkColor work the same as client side.
Author: jimtabor Date: Fri Jul 15 20:13:33 2016 New Revision: 71946 URL: http://svn.reactos.org/svn/reactos?rev=71946=rev Log: [NtGdi] - Make SetBkColor work the same as client side. Modified: trunk/reactos/win32ss/gdi/ntgdi/dcutil.c Modified: trunk/reactos/win32ss/gdi/ntgdi/dcutil.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/ntgdi/dcutil.c?rev=71946=71945=71946=diff == --- trunk/reactos/win32ss/gdi/ntgdi/dcutil.c[iso-8859-1] (original) +++ trunk/reactos/win32ss/gdi/ntgdi/dcutil.c[iso-8859-1] Fri Jul 15 20:13:33 2016 @@ -105,10 +105,15 @@ return CLR_INVALID; } pdcattr = dc->pdcattr; -oldColor = pdcattr->crBackgroundClr; -pdcattr->crBackgroundClr = color; -pdcattr->ulBackgroundClr = (ULONG)color; -pdcattr->ulDirty_ |= DIRTY_BACKGROUND|DIRTY_LINE|DIRTY_FILL; // Clear Flag if set. + +oldColor = pdcattr->ulBackgroundClr; +pdcattr->ulBackgroundClr = color; + +if (pdcattr->crBackgroundClr != color) +{ +pdcattr->ulDirty_ |= (DIRTY_BACKGROUND|DIRTY_LINE|DIRTY_FILL); // Clear Flag if set. +pdcattr->crBackgroundClr = color; +} hBrush = pdcattr->hbrush; DC_UnlockDc(dc); NtGdiSelectBrush(hDC, hBrush); @@ -184,6 +189,8 @@ } DC_vUpdateTextBrush(pdc); +//DC_vUpdateLineBrush(pdc); +//DC_vUpdateFillBrush(pdc); DC_UnlockDc(pdc);
[ros-diffs] [tthompson] 71945: [NTFS] *AddRun() - Don't leak RunBuffer when encountering errors. Handle exception from FsRtlAddLargeMcbEntry().
Author: tthompson Date: Fri Jul 15 15:27:04 2016 New Revision: 71945 URL: http://svn.reactos.org/svn/reactos?rev=71945=rev Log: [NTFS] *AddRun() - Don't leak RunBuffer when encountering errors. Handle exception from FsRtlAddLargeMcbEntry(). Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c URL: http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c?rev=71945=71944=71945=diff == --- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] (original) +++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/attrib.c [iso-8859-1] Fri Jul 15 15:27:04 2016 @@ -88,25 +88,40 @@ ULONGLONG NextVBN = AttrContext->Record.NonResident.LowestVCN; // Allocate some memory for the RunBuffer -PUCHAR RunBuffer = ExAllocatePoolWithTag(NonPagedPool, Vcb->NtfsInfo.BytesPerFileRecord, TAG_NTFS); +PUCHAR RunBuffer; int RunBufferOffset = 0; if (!AttrContext->Record.IsNonResident) return STATUS_INVALID_PARAMETER; + +RunBuffer = ExAllocatePoolWithTag(NonPagedPool, Vcb->NtfsInfo.BytesPerFileRecord, TAG_NTFS); // Convert the data runs to a map control block Status = ConvertDataRunsToLargeMCB(DataRun, , ); if (!NT_SUCCESS(Status)) { DPRINT1("Unable to convert data runs to MCB (probably ran out of memory)!\n"); +ExFreePoolWithTag(RunBuffer, TAG_NTFS); return Status; } // Add newly-assigned clusters to mcb -FsRtlAddLargeMcbEntry(, - NextVBN, - NextAssignedCluster, - RunLength); +_SEH2_TRY{ +if (!FsRtlAddLargeMcbEntry(, +NextVBN, + NextAssignedCluster, + RunLength)) +{ +FsRtlUninitializeLargeMcb(); +ExFreePoolWithTag(RunBuffer, TAG_NTFS); +return STATUS_INSUFFICIENT_RESOURCES; +} +} _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { +FsRtlUninitializeLargeMcb(); +ExFreePoolWithTag(RunBuffer, TAG_NTFS); +_SEH2_YIELD(return STATUS_INSUFFICIENT_RESOURCES); +} _SEH2_END; + // Convert the map control block back to encoded data runs ConvertLargeMCBToDataRuns(, RunBuffer, Vcb->NtfsInfo.BytesPerCluster, );