ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2011
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
276 discussions
Start a n
N
ew thread
[pschweitzer] 51016: [NTOSKRNL] Add most of the missing HAL stubs for both public & private dispatch tables
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Fri Mar 11 13:16:16 2011 New Revision: 51016 URL:
http://svn.reactos.org/svn/reactos?rev=51016&view=rev
Log: [NTOSKRNL] Add most of the missing HAL stubs for both public & private dispatch tables Modified: trunk/reactos/ntoskrnl/fstub/halstub.c trunk/reactos/ntoskrnl/include/internal/hal.h Modified: trunk/reactos/ntoskrnl/fstub/halstub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/halstub.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/fstub/halstub.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fstub/halstub.c [iso-8859-1] Fri Mar 11 13:16:16 2011 @@ -4,6 +4,7 @@ * FILE: ntoskrnl/fstub/halstub.c * PURPOSE: I/O Stub HAL Routines * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) + Pierre Schweitzer (pierre.schweitzer(a)reactos.org) */ /* INCLUDES ******************************************************************/ @@ -17,51 +18,51 @@ HAL_DISPATCH HalDispatchTable = { HAL_DISPATCH_VERSION, - (pHalQuerySystemInformation)NULL, - (pHalSetSystemInformation)NULL, - (pHalQueryBusSlots)NULL, + xHalQuerySystemInformation, + xHalSetSystemInformation, + xHalQueryBusSlots, 0, xHalExamineMBR, xHalIoAssignDriveLetters, xHalIoReadPartitionTable, xHalIoSetPartitionInformation, xHalIoWritePartitionTable, - (pHalHandlerForBus)NULL, - (pHalReferenceBusHandler)NULL, - (pHalReferenceBusHandler)NULL, - (pHalInitPnpDriver)NULL, - (pHalInitPowerManagement)NULL, + xHalHandlerForBus, + xHalReferenceHandler, + xHalReferenceHandler, + xHalInitPnpDriver, + xHalInitPowerManagement, (pHalGetDmaAdapter) NULL, xHalGetInterruptTranslator, - (pHalStartMirroring)NULL, - (pHalEndMirroring)NULL, - (pHalMirrorPhysicalMemory)NULL, + xHalStartMirroring, + xHalEndMirroring, + xHalMirrorPhysicalMemory, xHalEndOfBoot, - (pHalMirrorVerify)NULL + xHalMirrorPhysicalMemory }; HAL_PRIVATE_DISPATCH HalPrivateDispatchTable = { HAL_PRIVATE_DISPATCH_VERSION, - (pHalHandlerForBus)NULL, - (pHalHandlerForConfigSpace)NULL, - (pHalLocateHiberRanges)NULL, - (pHalRegisterBusHandler)NULL, + xHalHandlerForBus, + (pHalHandlerForConfigSpace)xHalHandlerForBus, + xHalLocateHiberRanges, + xHalRegisterBusHandler, xHalSetWakeEnable, - (pHalSetWakeAlarm)NULL, - (pHalTranslateBusAddress)NULL, - (pHalAssignSlotResources)NULL, + xHalSetWakeAlarm, + xHalTranslateBusAddress, + (pHalAssignSlotResources)xHalTranslateBusAddress, xHalHaltSystem, (pHalFindBusAddressTranslation)NULL, (pHalResetDisplay)NULL, - (pHalAllocateMapRegisters)NULL, - (pKdSetupPciDeviceForDebugging)NULL, - (pKdReleasePciDeviceForDebugging)NULL, - (pKdGetAcpiTablePhase0)NULL, - (pKdCheckPowerButton)NULL, - (pHalVectorToIDTEntry)xHalVectorToIDTEntry, - (pKdMapPhysicalMemory64)NULL, - (pKdUnmapVirtualAddress)NULL + xHalAllocateMapRegisters, + xKdSetupPciDeviceForDebugging, + xKdReleasePciDeviceForDebugging, + xKdGetAcpiTablePhase, + (pKdCheckPowerButton)xHalReferenceHandler, + xHalVectorToIDTEntry, + (pKdMapPhysicalMemory64)MatchAll, + (pKdUnmapVirtualAddress)xKdUnmapVirtualAddress }; /* FUNCTIONS *****************************************************************/ @@ -86,6 +87,8 @@ NTAPI xHalEndOfBoot(VOID) { + PAGED_CODE(); + /* Nothing */ return; } @@ -97,3 +100,193 @@ /* Nothing */ return; } + +PBUS_HANDLER +FASTCALL +xHalHandlerForBus(IN INTERFACE_TYPE InterfaceType, + IN ULONG BusNumber) +{ + return NULL; +} + +VOID +FASTCALL +xHalReferenceHandler(IN PBUS_HANDLER BusHandler) +{ + /* Nothing */ + return; +} + +NTSTATUS +NTAPI +xHalInitPnpDriver(VOID) +{ + return STATUS_NOT_SUPPORTED; +} + +NTSTATUS +NTAPI +xHalInitPowerManagement(IN PPM_DISPATCH_TABLE PmDriverDispatchTable, + OUT PPM_DISPATCH_TABLE *PmHalDispatchTable) +{ + return STATUS_NOT_SUPPORTED; +} + +NTSTATUS +NTAPI +xHalStartMirroring(VOID) +{ + PAGED_CODE(); + + return STATUS_NOT_SUPPORTED; +} + +NTSTATUS +NTAPI +xHalEndMirroring(IN ULONG PassNumber) +{ + return STATUS_NOT_SUPPORTED; +} + +NTSTATUS +NTAPI +xHalMirrorPhysicalMemory(IN PHYSICAL_ADDRESS PhysicalAddress, + IN LARGE_INTEGER NumberOfBytes) +{ + return STATUS_NOT_SUPPORTED; +} + +NTSTATUS +NTAPI +xHalQueryBusSlots(IN PBUS_HANDLER BusHandler, + IN ULONG BufferSize, + OUT PULONG SlotNumbers, + OUT PULONG ReturnedLength) +{ + PAGED_CODE(); + + return STATUS_NOT_SUPPORTED; +} + +NTSTATUS +NTAPI +xHalSetSystemInformation(IN HAL_SET_INFORMATION_CLASS InformationClass, + IN ULONG BufferSize, + IN PVOID Buffer) +{ + PAGED_CODE(); + + return STATUS_INVALID_LEVEL; +} + +NTSTATUS +NTAPI +xHalQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, + IN ULONG BufferSize, + IN OUT PVOID Buffer, + OUT PULONG ReturnedLength) +{ + PAGED_CODE(); + + return STATUS_INVALID_LEVEL; +} + +VOID +NTAPI +xHalLocateHiberRanges(IN PVOID MemoryMap) +{ + /* Nothing */ + return; +} + +NTSTATUS +NTAPI +xHalRegisterBusHandler(IN INTERFACE_TYPE InterfaceType, + IN BUS_DATA_TYPE ConfigSpace, + IN ULONG BusNumber, + IN INTERFACE_TYPE ParentInterfaceType, + IN ULONG ParentBusNumber, + IN ULONG ContextSize, + IN PINSTALL_BUS_HANDLER InstallCallback, + OUT PBUS_HANDLER *BusHandler) +{ + PAGED_CODE(); + + return STATUS_NOT_SUPPORTED; +} + +VOID +NTAPI +xHalSetWakeAlarm(IN ULONGLONG AlartTime, + IN PTIME_FIELDS TimeFields) +{ + /* Nothing */ + return; +} + +BOOLEAN +NTAPI +xHalTranslateBusAddress(IN INTERFACE_TYPE InterfaceType, + IN ULONG BusNumber, + IN PHYSICAL_ADDRESS BusAddress, + IN OUT PULONG AddressSpace, + OUT PPHYSICAL_ADDRESS TranslatedAddress) +{ + KeBugCheckEx(HAL_INITIALIZATION_FAILED, 0, 0, 0, 0); + + return FALSE; +} + +NTSTATUS +NTAPI +xHalAllocateMapRegisters(IN PADAPTER_OBJECT AdapterObject, + IN ULONG Unknown, + IN ULONG Unknown2, + PMAP_REGISTER_ENTRY Registers) +{ + PAGED_CODE(); + + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +xKdSetupPciDeviceForDebugging(IN PVOID LoaderBlock OPTIONAL, + IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS +NTAPI +xKdReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice) +{ + return STATUS_NOT_IMPLEMENTED; +} + +PVOID +NTAPI +xKdGetAcpiTablePhase(IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, + IN ULONG Signature) +{ + return NULL; +} + +PVOID +NTAPI +MatchAll(IN PHYSICAL_ADDRESS PhysicalAddress, + IN ULONG NumberPages, + IN BOOLEAN FlushCurrentTLB) +{ + return NULL; +} + +VOID +NTAPI +xKdUnmapVirtualAddress(IN PVOID VirtualAddress, + IN ULONG NumberPages, + IN BOOLEAN FlushCurrentTLB) +{ + /* Nothing */ + return; +} Modified: trunk/reactos/ntoskrnl/include/internal/hal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/hal.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/hal.h [iso-8859-1] Fri Mar 11 13:16:16 2011 @@ -4,6 +4,7 @@ * FILE: ntoskrnl/include/hal.h * PURPOSE: Internal header for the I/O HAL Functions (Fstub) * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) + * Pierre Schweitzer (pierre.schweitzer(a)reactos.org) */ #pragma once @@ -73,13 +74,167 @@ NTSTATUS NTAPI -xHalGetInterruptTranslator(IN INTERFACE_TYPE ParentInterfaceType, - IN ULONG ParentBusNumber, - IN INTERFACE_TYPE BridgeInterfaceType, - IN USHORT Size, - IN USHORT Version, - OUT PTRANSLATOR_INTERFACE Translator, - OUT PULONG BridgeBusNumber); +xHalGetInterruptTranslator( + IN INTERFACE_TYPE ParentInterfaceType, + IN ULONG ParentBusNumber, + IN INTERFACE_TYPE BridgeInterfaceType, + IN USHORT Size, + IN USHORT Version, + OUT PTRANSLATOR_INTERFACE Translator, + OUT PULONG BridgeBusNumber +); + +PBUS_HANDLER +FASTCALL +xHalHandlerForBus( + IN INTERFACE_TYPE InterfaceType, + IN ULONG BusNumber +); + +VOID +FASTCALL +xHalReferenceHandler( + IN PBUS_HANDLER BusHandler +); + +NTSTATUS +NTAPI +xHalInitPnpDriver( + VOID +); + +NTSTATUS +NTAPI +xHalInitPowerManagement( + IN PPM_DISPATCH_TABLE PmDriverDispatchTable, + OUT PPM_DISPATCH_TABLE *PmHalDispatchTable +); + +NTSTATUS +NTAPI +xHalStartMirroring( + VOID +); + +NTSTATUS +NTAPI +xHalEndMirroring( + IN ULONG PassNumber +); + +NTSTATUS +NTAPI +xHalMirrorPhysicalMemory( + IN PHYSICAL_ADDRESS PhysicalAddress, + IN LARGE_INTEGER NumberOfBytes +); + +NTSTATUS +NTAPI +xHalQueryBusSlots( + IN PBUS_HANDLER BusHandler, + IN ULONG BufferSize, + OUT PULONG SlotNumbers, + OUT PULONG ReturnedLength +); + +NTSTATUS +NTAPI +xHalSetSystemInformation( + IN HAL_SET_INFORMATION_CLASS InformationClass, + IN ULONG BufferSize, + IN PVOID Buffer +); + +NTSTATUS +NTAPI +xHalQuerySystemInformation( + IN HAL_QUERY_INFORMATION_CLASS InformationClass, + IN ULONG BufferSize, + IN OUT PVOID Buffer, + OUT PULONG ReturnedLength +); + +VOID +NTAPI +xHalLocateHiberRanges( + IN PVOID MemoryMap +); + +NTSTATUS +NTAPI +xHalRegisterBusHandler( + IN INTERFACE_TYPE InterfaceType, + IN BUS_DATA_TYPE ConfigSpace, + IN ULONG BusNumber, + IN INTERFACE_TYPE ParentInterfaceType, + IN ULONG ParentBusNumber, + IN ULONG ContextSize, + IN PINSTALL_BUS_HANDLER InstallCallback, + OUT PBUS_HANDLER *BusHandler +); + +VOID +NTAPI +xHalSetWakeAlarm( + IN ULONGLONG AlartTime, + IN PTIME_FIELDS TimeFields +); + +BOOLEAN +NTAPI +xHalTranslateBusAddress( + IN INTERFACE_TYPE InterfaceType, + IN ULONG BusNumber, + IN PHYSICAL_ADDRESS BusAddress, + IN OUT PULONG AddressSpace, + OUT PPHYSICAL_ADDRESS TranslatedAddress +); + +NTSTATUS +NTAPI +xHalAllocateMapRegisters( + IN PADAPTER_OBJECT AdapterObject, + IN ULONG Unknown, + IN ULONG Unknown2, + PMAP_REGISTER_ENTRY Registers +); + +NTSTATUS +NTAPI +xKdSetupPciDeviceForDebugging( + IN PVOID LoaderBlock OPTIONAL, + IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice +); + +NTSTATUS +NTAPI +xKdReleasePciDeviceForDebugging( + IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice +); + +PVOID +NTAPI +xKdGetAcpiTablePhase( + IN struct _LOADER_PARAMETER_BLOCK *LoaderBlock, + IN ULONG Signature +); + +PVOID +NTAPI +MatchAll( + IN PHYSICAL_ADDRESS PhysicalAddress, + IN ULONG NumberPages, + IN BOOLEAN FlushCurrentTLB +); + +VOID +NTAPI +xKdUnmapVirtualAddress( + IN PVOID VirtualAddress, + IN ULONG NumberPages, + IN BOOLEAN FlushCurrentTLB +); //
13 years, 8 months
1
0
0
0
[pschweitzer] 51015: [NDK] pHalAllocateMapRegisters type functions are to return NTSTATUS and not BOOLEAN
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Fri Mar 11 13:00:20 2011 New Revision: 51015 URL:
http://svn.reactos.org/svn/reactos?rev=51015&view=rev
Log: [NDK] pHalAllocateMapRegisters type functions are to return NTSTATUS and not BOOLEAN Modified: trunk/reactos/include/ndk/haltypes.h Modified: trunk/reactos/include/ndk/haltypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/haltypes.h?rev…
============================================================================== --- trunk/reactos/include/ndk/haltypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/haltypes.h [iso-8859-1] Fri Mar 11 13:00:20 2011 @@ -88,7 +88,7 @@ ); typedef -BOOLEAN +NTSTATUS (NTAPI *pHalAllocateMapRegisters)( IN PADAPTER_OBJECT AdapterObject, IN ULONG Unknown,
13 years, 8 months
1
0
0
0
[jgardou] 51014: [GDI32] - allocate sufficient buffer when creating a DIBSECTION compatible bitmap. Fixes bug 5822
by jgardou@svn.reactos.org
Author: jgardou Date: Fri Mar 11 10:33:03 2011 New Revision: 51014 URL:
http://svn.reactos.org/svn/reactos?rev=51014&view=rev
Log: [GDI32] - allocate sufficient buffer when creating a DIBSECTION compatible bitmap. Fixes bug 5822 Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/bi…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] Fri Mar 11 10:33:03 2011 @@ -348,8 +348,6 @@ INT Height) { PDC_ATTR pDc_Attr; - HBITMAP hBmp = NULL; - DIBSECTION dibs; if (!GdiGetHandleUserData(hDC, GDI_OBJECT_TYPE_DC, (PVOID)&pDc_Attr)) return NULL; @@ -361,19 +359,26 @@ { return NtGdiCreateCompatibleBitmap(hDC, Width, Height); } - - hBmp = NtGdiGetDCObject(hDC, GDI_OBJECT_TYPE_BITMAP); - - if ( GetObjectA(hBmp, sizeof(DIBSECTION), &dibs) != sizeof(DIBSECTION) ) - return NULL; - - if ( dibs.dsBm.bmBitsPixel <= 8 ) - GetDIBColorTable(hDC, 0, 256, (RGBQUAD *)&dibs.dsBitfields); - - dibs.dsBmih.biWidth = Width; - dibs.dsBmih.biHeight = Height; - - return CreateDIBSection(hDC, (CONST BITMAPINFO *)&dibs.dsBmih, 0, NULL, NULL, 0); + else + { + HBITMAP hBmp = NULL; + char buffer[sizeof(DIBSECTION) + 256*sizeof(RGBQUAD)]; + DIBSECTION* pDIBs = (DIBSECTION*)buffer; + + hBmp = NtGdiGetDCObject(hDC, GDI_OBJECT_TYPE_BITMAP); + + if ( GetObjectA(hBmp, sizeof(DIBSECTION), pDIBs) != sizeof(DIBSECTION) ) + return NULL; + + if ( pDIBs->dsBm.bmBitsPixel <= 8 ) + GetDIBColorTable(hDC, 0, 256, (RGBQUAD *)&pDIBs->dsBitfields[0]); + + pDIBs->dsBmih.biWidth = Width; + pDIBs->dsBmih.biHeight = Height; + + return CreateDIBSection(hDC, (CONST BITMAPINFO *)&pDIBs->dsBmih, 0, NULL, NULL, 0); + } + return NULL; }
13 years, 8 months
1
0
0
0
[fireball] 51013: [NOTEPAD] - Edijs: Zero initialize the caption string. See issue #5992 for more details.
by fireball@svn.reactos.org
Author: fireball Date: Thu Mar 10 22:07:56 2011 New Revision: 51013 URL:
http://svn.reactos.org/svn/reactos?rev=51013&view=rev
Log: [NOTEPAD] - Edijs: Zero initialize the caption string. See issue #5992 for more details. Modified: trunk/reactos/base/applications/notepad/dialog.c Modified: trunk/reactos/base/applications/notepad/dialog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/notepad/…
============================================================================== --- trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/notepad/dialog.c [iso-8859-1] Thu Mar 10 22:07:56 2011 @@ -117,7 +117,7 @@ */ static void UpdateWindowCaption(void) { - TCHAR szCaption[MAX_STRING_LEN]; + TCHAR szCaption[MAX_STRING_LEN] = _T(""); TCHAR szNotepad[MAX_STRING_LEN]; LoadString(Globals.hInstance, STRING_NOTEPAD, szNotepad, SIZEOF(szNotepad));
13 years, 8 months
1
0
0
0
[pschweitzer] 51012: [NTOSKRNL] Implemented FstubTranslatorNull, FstubTranslateResource, FstubTranslateRequirement, xHalGetInterruptTranslator. In other words: please welcome interrupt translator i...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Thu Mar 10 21:02:21 2011 New Revision: 51012 URL:
http://svn.reactos.org/svn/reactos?rev=51012&view=rev
Log: [NTOSKRNL] Implemented FstubTranslatorNull, FstubTranslateResource, FstubTranslateRequirement, xHalGetInterruptTranslator. In other words: please welcome interrupt translator in ReactOS. It's not used yet. Added: trunk/reactos/ntoskrnl/fstub/translate.c (with props) Modified: trunk/reactos/ntoskrnl/fstub/halstub.c trunk/reactos/ntoskrnl/include/internal/hal.h trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild Modified: trunk/reactos/ntoskrnl/fstub/halstub.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/halstub.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/fstub/halstub.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fstub/halstub.c [iso-8859-1] Thu Mar 10 21:02:21 2011 @@ -32,7 +32,7 @@ (pHalInitPnpDriver)NULL, (pHalInitPowerManagement)NULL, (pHalGetDmaAdapter) NULL, - (pHalGetInterruptTranslator)NULL, + xHalGetInterruptTranslator, (pHalStartMirroring)NULL, (pHalEndMirroring)NULL, (pHalMirrorPhysicalMemory)NULL, Added: trunk/reactos/ntoskrnl/fstub/translate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/translate.c…
============================================================================== --- trunk/reactos/ntoskrnl/fstub/translate.c (added) +++ trunk/reactos/ntoskrnl/fstub/translate.c [iso-8859-1] Thu Mar 10 21:02:21 2011 @@ -1,0 +1,189 @@ +/* +* PROJECT: ReactOS Kernel +* LICENSE: GPL - See COPYING in the top level directory +* FILE: ntoskrnl/fstub/translate.c +* PURPOSE: Interrupt Translator Routines +* PROGRAMMERS: Pierre Schweitzer (pierre.schweitzer(a)reactos.org) +*/ + +/* INCLUDES ******************************************************************/ + +#include <ntoskrnl.h> +#define NDEBUG +#include <debug.h> + +#define HAL_IRQ_TRANSLATOR_VERSION 0x0 + +/* PRIVATE FUNCTIONS *********************************************************/ + +/* + * @implemented + */ +VOID +NTAPI +FstubTranslatorNull(PVOID Context) +{ + PAGED_CODE(); + + /* Do nothing */ + return; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +FstubTranslateResource(IN OUT PVOID Context OPTIONAL, + IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Source, + IN RESOURCE_TRANSLATION_DIRECTION Direction, + IN ULONG AlternativesCount OPTIONAL, + IN IO_RESOURCE_DESCRIPTOR Alternatives[], + IN PDEVICE_OBJECT PhysicalDeviceObject, + OUT PCM_PARTIAL_RESOURCE_DESCRIPTOR Target) +{ + INT k; + KIRQL Irql; + KAFFINITY Affinity; + ULONG MinimumVector, Vector; + PIO_RESOURCE_DESCRIPTOR Alternative; + NTSTATUS Status = STATUS_UNSUCCESSFUL; + PAGED_CODE(); + + ASSERT(Source->Type == CmResourceTypeInterrupt); + + /* Copy common information */ + Target->Type = Source->Type; + Target->ShareDisposition = Source->ShareDisposition; + Target->Flags = Source->Flags; + + if (Direction == TranslateChildToParent) + { + /* Get IRQL, affinity & system vector for the device vector */ + Target->u.Interrupt.Vector = HalGetInterruptVector((INTERFACE_TYPE)Context, 0, + Source->u.Interrupt.Vector, + Source->u.Interrupt.Vector, + &Irql, &Affinity); + Target->u.Interrupt.Level = Irql; + Target->u.Interrupt.Affinity = Affinity; + Status = STATUS_TRANSLATION_COMPLETE; + } + else if (Direction == TranslateParentToChild) + { + /* Browse all the resources */ + for (k = 0; k < AlternativesCount; k++) + { + Alternative = &(Alternatives[k]); + + ASSERT(Alternative->Type == CmResourceTypeInterrupt); + + /* Try to find the device vector, proceeding by trial & error + * We try a vector, and translate it + */ + MinimumVector = Alternative->u.Interrupt.MinimumVector; + while (MinimumVector <= Alternative->u.Interrupt.MaximumVector) + { + /* Translate the vector */ + Vector = HalGetInterruptVector((INTERFACE_TYPE)Context, 0, + MinimumVector, + MinimumVector, + &Irql, &Affinity); + + /* If the translated vector is matching the given translated vector */ + if (Vector == Source->u.Interrupt.Vector) + { + /* We are done, send back device vector */ + Target->u.Interrupt.Affinity = -1; + Target->u.Interrupt.Vector = MinimumVector; + Target->u.Interrupt.Level = MinimumVector; + + return STATUS_SUCCESS; + } + + MinimumVector++; + } + } + } + + return Status; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +FstubTranslateRequirement(IN OUT PVOID Context OPTIONAL, + IN PIO_RESOURCE_DESCRIPTOR Source, + IN PDEVICE_OBJECT PhysicalDeviceObject, + OUT PULONG TargetCount, + OUT PIO_RESOURCE_DESCRIPTOR *Target) +{ + KIRQL Irql; + KAFFINITY Affinity; + PAGED_CODE(); + + ASSERT(Source->Type == CmResourceTypeInterrupt); + + /* Allocate output buffer */ + *Target = ExAllocatePoolWithTag(PagedPool, sizeof(IO_RESOURCE_DESCRIPTOR), 'btsF'); + if (!*Target) + { + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* Zero & set out count to 1 */ + RtlZeroMemory(*Target, sizeof(IO_RESOURCE_DESCRIPTOR)); + *TargetCount = 1; + + /* Translate minimum interrupt vector */ + (*Target)->u.Interrupt.MinimumVector = HalGetInterruptVector((INTERFACE_TYPE)Context, 0, + Source->u.Interrupt.MinimumVector, + Source->u.Interrupt.MinimumVector, + &Irql, &Affinity); + + /* Translate maximum interrupt vector */ + (*Target)->u.Interrupt.MaximumVector = HalGetInterruptVector((INTERFACE_TYPE)Context, 0, + Source->u.Interrupt.MaximumVector, + Source->u.Interrupt.MaximumVector, + &Irql, &Affinity); + + return STATUS_TRANSLATION_COMPLETE; +} + +/* + * @implemented + */ +NTSTATUS +NTAPI +xHalGetInterruptTranslator(IN INTERFACE_TYPE ParentInterfaceType, + IN ULONG ParentBusNumber, + IN INTERFACE_TYPE BridgeInterfaceType, + IN USHORT Size, + IN USHORT Version, + OUT PTRANSLATOR_INTERFACE Translator, + OUT PULONG BridgeBusNumber) +{ + PAGED_CODE(); + + ASSERT(Version == HAL_IRQ_TRANSLATOR_VERSION); + ASSERT(Size >= sizeof(TRANSLATOR_INTERFACE)); + + /* Only (E)ISA interfaces are supported */ + if (BridgeInterfaceType == Internal || BridgeInterfaceType >= MicroChannel) + { + return STATUS_NOT_IMPLEMENTED; + } + + /* Fill in output struct */ + Translator->Size = sizeof(TRANSLATOR_INTERFACE); + Translator->Version = HAL_IRQ_TRANSLATOR_VERSION; + /* In case caller set interface to undefined, faulty it to ISA */ + Translator->Context = (PVOID)((BridgeInterfaceType == InterfaceTypeUndefined) ? Isa : BridgeInterfaceType); + Translator->InterfaceReference = FstubTranslatorNull; + Translator->InterfaceDereference = FstubTranslatorNull; + Translator->TranslateResources = FstubTranslateResource; + Translator->TranslateResourceRequirements = FstubTranslateRequirement; + + return STATUS_SUCCESS; +} Propchange: trunk/reactos/ntoskrnl/fstub/translate.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/ntoskrnl/include/internal/hal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/hal.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/hal.h [iso-8859-1] Thu Mar 10 21:02:21 2011 @@ -70,6 +70,16 @@ xHalVectorToIDTEntry( IN ULONG Vector ); + +NTSTATUS +NTAPI +xHalGetInterruptTranslator(IN INTERFACE_TYPE ParentInterfaceType, + IN ULONG ParentBusNumber, + IN INTERFACE_TYPE BridgeInterfaceType, + IN USHORT Size, + IN USHORT Version, + OUT PTRANSLATOR_INTERFACE Translator, + OUT PULONG BridgeBusNumber); // Modified: trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl-generic.…
============================================================================== --- trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ntoskrnl-generic.rbuild [iso-8859-1] Thu Mar 10 21:02:21 2011 @@ -285,6 +285,7 @@ <file>disksup.c</file> <file>fstubex.c</file> <file>halstub.c</file> + <file>translate.c</file> </directory> <directory name="inbv"> <file>inbv.c</file>
13 years, 8 months
1
0
0
0
[gedmurphy] 51011: FatCreateCcb has no params. Fixes building on msvc
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Thu Mar 10 15:37:51 2011 New Revision: 51011 URL:
http://svn.reactos.org/svn/reactos?rev=51011&view=rev
Log: FatCreateCcb has no params. Fixes building on msvc Modified: trunk/reactos/drivers/filesystems/fastfat_new/dir.c Modified: trunk/reactos/drivers/filesystems/fastfat_new/dir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
============================================================================== --- trunk/reactos/drivers/filesystems/fastfat_new/dir.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fastfat_new/dir.c [iso-8859-1] Thu Mar 10 15:37:51 2011 @@ -248,7 +248,7 @@ } /* Set the file object */ - Ccb = FatCreateCcb(IrpContext); + Ccb = FatCreateCcb(); FatSetFileObject(FileObject, UserDirectoryOpen, Dcb,
13 years, 8 months
1
0
0
0
[janderwald] 51010: [MSAFD] - Fix bug introduced in 51007
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Mar 10 14:07:55 2011 New Revision: 51010 URL:
http://svn.reactos.org/svn/reactos?rev=51010&view=rev
Log: [MSAFD] - Fix bug introduced in 51007 Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
============================================================================== --- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Thu Mar 10 14:07:55 2011 @@ -907,7 +907,7 @@ } PollInfo->HandleCount = j; - PollBufferSize = sizeof(AFD_POLL_INFO) + (PollInfo->HandleCount > 1 ? sizeof(HANDLE) * ( PollInfo->HandleCount - 1) : 0); + PollBufferSize = FIELD_OFFSET(AFD_POLL_INFO, Handles) + PollInfo->HandleCount * sizeof(AFD_HANDLE); /* Send IOCTL */ Status = NtDeviceIoControlFile((HANDLE)PollInfo->Handles[0].Handle,
13 years, 8 months
1
0
0
0
[jimtabor] 51009: [GDI32] - Protect SetDIBitsToDevice with seh and track it. This is for vbrun60spXX. Code fix ups and cleanup.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Thu Mar 10 13:45:09 2011 New Revision: 51009 URL:
http://svn.reactos.org/svn/reactos?rev=51009&view=rev
Log: [GDI32] - Protect SetDIBitsToDevice with seh and track it. This is for vbrun60spXX. Code fix ups and cleanup. Modified: trunk/reactos/dll/win32/gdi32/include/gdi32p.h trunk/reactos/dll/win32/gdi32/objects/bitmap.c trunk/reactos/dll/win32/gdi32/objects/utils.c Modified: trunk/reactos/dll/win32/gdi32/include/gdi32p.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/include/gd…
============================================================================== --- trunk/reactos/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] Thu Mar 10 13:45:09 2011 @@ -279,7 +279,6 @@ GdiSetLastError( DWORD dwErrCode ); DWORD WINAPI GdiGetCodePage(HDC); -UINT FASTCALL DIB_BitmapBitsSize( CONST BITMAPINFO* ); int WINAPI Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/bi…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/objects/bitmap.c [iso-8859-1] Thu Mar 10 13:45:09 2011 @@ -2,6 +2,9 @@ #define NDEBUG #include <debug.h> + +// From Yuan, ScanLineSize = (Width * bitcount + 31)/32 +#define WIDTH_BYTES_ALIGN32(cx, bpp) ((((cx) * (bpp) + 31) & ~31) >> 3) /* * DIB_BitmapInfoSize @@ -42,52 +45,28 @@ FASTCALL DIB_BitmapMaxBitsSize( PBITMAPINFO Info, UINT ScanLines ) { - UINT MaxBits = 0; + UINT Ret; if (!Info) return 0; - if (Info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) + if ( Info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) { PBITMAPCOREHEADER Core = (PBITMAPCOREHEADER)Info; - MaxBits = Core->bcBitCount * Core->bcPlanes * Core->bcWidth; - } - else /* assume BITMAPINFOHEADER */ - { - if ((Info->bmiHeader.biCompression) && (Info->bmiHeader.biCompression != BI_BITFIELDS)) - return Info->bmiHeader.biSizeImage; - // Planes are over looked by Yuan. I guess assumed always 1. - MaxBits = Info->bmiHeader.biBitCount * Info->bmiHeader.biPlanes * Info->bmiHeader.biWidth; - } - MaxBits = ((MaxBits + 31) & ~31 ) / 8; // From Yuan, ScanLineSize = (Width * bitcount + 31)/32 - return (MaxBits * ScanLines); // ret the full Size. -} - -UINT -FASTCALL -DIB_BitmapBitsSize( CONST BITMAPINFO* Info ) -{ - UINT Ret; - - if (!Info) return 0; - - if ( Info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) - { - PBITMAPCOREHEADER Core = (PBITMAPCOREHEADER)Info; - Ret = Core->bcHeight * - ((Core->bcWidth * Core->bcPlanes * Core->bcBitCount + 31) & ~31 ) / 8; + Ret = WIDTH_BYTES_ALIGN32(Core->bcWidth * Core->bcPlanes, Core->bcBitCount) * ScanLines; } else /* assume BITMAPINFOHEADER */ { - if ((Info->bmiHeader.biCompression) && - (Info->bmiHeader.biCompression != BI_BITFIELDS)) - return Info->bmiHeader.biSizeImage; - // Make Height positive always.... - Ret = abs(Info->bmiHeader.biHeight) * - ((Info->bmiHeader.biWidth * Info->bmiHeader.biPlanes * Info->bmiHeader.biBitCount + 31) & ~31 ) / 8; + if (!(Info->bmiHeader.biCompression) || (Info->bmiHeader.biCompression == BI_BITFIELDS)) + { + Ret = WIDTH_BYTES_ALIGN32(Info->bmiHeader.biWidth * Info->bmiHeader.biPlanes, Info->bmiHeader.biBitCount) * ScanLines; + } + else + { + Ret = Info->bmiHeader.biSizeImage; + } } return Ret; } - /* * DIB_GetBitmapInfo is complete copy of wine cvs 2/9-2006 @@ -161,39 +140,27 @@ WINAPI GdiGetBitmapBitsSize(BITMAPINFO *lpbmi) { - int retSize; - - if (lpbmi->bmiHeader.biSize == FIELD_OFFSET(BITMAPINFOHEADER, biPlanes)) - { - /* Calc the bits Size and align it*/ - retSize = HIWORD(lpbmi->bmiHeader.biWidth) * ((LOWORD(lpbmi->bmiHeader.biWidth) * - LOWORD(lpbmi->bmiHeader.biHeight) * HIWORD(lpbmi->bmiHeader.biHeight) + 31) - & -32) / 8; - } - else - { - if ( (lpbmi->bmiHeader.biCompression == BI_BITFIELDS) || - (lpbmi->bmiHeader.biCompression == BI_RGB)) - { - if (lpbmi->bmiHeader.biHeight >=0 ) - { - /* Calc the bits Size and align it*/ - retSize = lpbmi->bmiHeader.biHeight * ((lpbmi->bmiHeader.biWidth * - lpbmi->bmiHeader.biPlanes * lpbmi->bmiHeader.biBitCount + 31) & -32) / 8; - } - else - { - /* Make height postiive if it negitve then calc the bits Size and align it*/ - retSize = (-lpbmi->bmiHeader.biHeight) * ((lpbmi->bmiHeader.biWidth * - lpbmi->bmiHeader.biPlanes * lpbmi->bmiHeader.biBitCount + 31) & -32) / 8; - } + UINT Ret; + + if (!lpbmi) return 0; + + if ( lpbmi->bmiHeader.biSize == sizeof(BITMAPCOREHEADER)) + { + PBITMAPCOREHEADER Core = (PBITMAPCOREHEADER)lpbmi; + Ret = WIDTH_BYTES_ALIGN32(Core->bcWidth * Core->bcPlanes, Core->bcBitCount) * Core->bcHeight; + } + else /* assume BITMAPINFOHEADER */ + { + if (!(lpbmi->bmiHeader.biCompression) || (lpbmi->bmiHeader.biCompression == BI_BITFIELDS)) + { + Ret = WIDTH_BYTES_ALIGN32(lpbmi->bmiHeader.biWidth * lpbmi->bmiHeader.biPlanes, lpbmi->bmiHeader.biBitCount) * abs(lpbmi->bmiHeader.biHeight); } else { - retSize = lpbmi->bmiHeader.biSizeImage; - } - } - return retSize; + Ret = lpbmi->bmiHeader.biSizeImage; + } + } + return Ret; } /* @@ -316,7 +283,7 @@ } /* - * @unimplemented + * @implemented */ HBITMAP WINAPI CreateBitmap(INT Width, @@ -325,7 +292,6 @@ UINT BitsPixel, CONST VOID* pUnsafeBits) { - /* FIXME some part should be done in user mode */ if (Width && Height) { return NtGdiCreateBitmap(Width, Height, Planes, BitsPixel, (LPBYTE) pUnsafeBits); @@ -493,7 +459,7 @@ { _SEH2_TRY { - cjBmpScanSize = DIB_BitmapBitsSize(Data); + cjBmpScanSize = GdiGetBitmapBitsSize((BITMAPINFO *)Data); CalculateColorTableSize(&Data->bmiHeader, &ColorUse, &InfoSize); InfoSize += Data->bmiHeader.biSize; } @@ -566,9 +532,9 @@ } } - hDCc = NtGdiGetDCforBitmap(hBitmap); + hDCc = NtGdiGetDCforBitmap(hBitmap); // hDC can be NULL, so, get it from the bitmap. SavehDC = hDCc; - if ( !hDCc ) + if ( !hDCc ) // No DC associated with bitmap, Clone or Create one. { nhDC = CreateCompatibleDC(hDC); if ( !nhDC ) return 0; @@ -648,6 +614,7 @@ UINT ConvertedInfoSize; INT LinesCopied = 0; UINT cjBmpScanSize = 0; + BOOL Hit = FALSE; PVOID pvSafeBits = (PVOID)Bits; if ( !ScanLines || !lpbmi || !Bits ) @@ -711,7 +678,26 @@ { pvSafeBits = RtlAllocateHeap(GetProcessHeap(), 0, cjBmpScanSize); if (pvSafeBits) - RtlCopyMemory( pvSafeBits, Bits, cjBmpScanSize); + { + _SEH2_TRY + { + RtlCopyMemory( pvSafeBits, Bits, cjBmpScanSize); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Hit = TRUE; + } + _SEH2_END + + if (Hit) + { + // We don't die, we continue on with a allocated safe pointer to kernel + // space..... + DPRINT1("SetDIBitsToDevice fail to read BitMapInfo: %x or Bits: %x & Size: %d\n",pConvertedInfo,Bits,cjBmpScanSize); + } + DPRINT("SetDIBitsToDevice Allocate Bits %d!!!\n", cjBmpScanSize); + } + } if (!GdiGetHandleUserData(hdc, GDI_OBJECT_TYPE_DC, (PVOID)&pDc_Attr)) @@ -720,7 +706,8 @@ return 0; } /* - if ( !pDc_Attr || + if ( !pDc_Attr || // DC is Public + ColorUse == DIB_PAL_COLORS || ((pConvertedInfo->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER)) && (pConvertedInfo->bmiHeader.biCompression == BI_JPEG || pConvertedInfo->bmiHeader.biCompression == BI_PNG )) )*/ @@ -833,7 +820,7 @@ return 0; } - cjBmpScanSize = DIB_BitmapBitsSize((LPBITMAPINFO)pConvertedInfo); + cjBmpScanSize = GdiGetBitmapBitsSize((BITMAPINFO *)pConvertedInfo); if ( lpBits ) { @@ -867,6 +854,7 @@ } /* if ( !pDc_Attr || + iUsage == DIB_PAL_COLORS || ((pConvertedInfo->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER)) && (pConvertedInfo->bmiHeader.biCompression == BI_JPEG || pConvertedInfo->bmiHeader.biCompression == BI_PNG )) )*/ Modified: trunk/reactos/dll/win32/gdi32/objects/utils.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/ut…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/utils.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/objects/utils.c [iso-8859-1] Thu Mar 10 13:45:09 2011 @@ -214,7 +214,7 @@ if (FollowedByData) { - DataSize = DIB_BitmapBitsSize((PBITMAPINFO)BitmapInfo ); + DataSize = GdiGetBitmapBitsSize((PBITMAPINFO)BitmapInfo ); } /*
13 years, 8 months
1
0
0
0
[jimtabor] 51008: [Win32k] - Fix an uncovered bug. This should fix coolplayer and winamp type applications. Does not fix drawing issues.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Thu Mar 10 13:09:56 2011 New Revision: 51008 URL:
http://svn.reactos.org/svn/reactos?rev=51008&view=rev
Log: [Win32k] - Fix an uncovered bug. This should fix coolplayer and winamp type applications. Does not fix drawing issues. Modified: trunk/reactos/subsystems/win32/win32k/include/gdiobj.h trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c trunk/reactos/subsystems/win32/win32k/objects/region.c Modified: trunk/reactos/subsystems/win32/win32k/include/gdiobj.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/gdiobj.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/gdiobj.h [iso-8859-1] Thu Mar 10 13:09:56 2011 @@ -160,3 +160,7 @@ #define GDIOBJ_GetKernelObj(Handle) \ ((PGDI_TABLE_ENTRY)&GdiHandleTable->Entries[GDI_HANDLE_GET_INDEX(Handle)])->KernelData +#define GDI_ENTRY_TO_INDEX(ht, e) \ + (((ULONG_PTR)(e) - (ULONG_PTR)&((ht)->Entries[0])) / sizeof(GDI_TABLE_ENTRY)) +#define GDI_HANDLE_GET_ENTRY(HandleTable, h) \ + (&(HandleTable)->Entries[GDI_HANDLE_GET_INDEX((h))]) Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Thu Mar 10 13:09:56 2011 @@ -11,11 +11,6 @@ #include <win32k.h> #define NDEBUG #include <debug.h> - -#define GDI_ENTRY_TO_INDEX(ht, e) \ - (((ULONG_PTR)(e) - (ULONG_PTR)&((ht)->Entries[0])) / sizeof(GDI_TABLE_ENTRY)) -#define GDI_HANDLE_GET_ENTRY(HandleTable, h) \ - (&(HandleTable)->Entries[GDI_HANDLE_GET_INDEX((h))]) #define BASE_OBJTYPE_COUNT 32 Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Thu Mar 10 13:09:56 2011 @@ -2073,14 +2073,12 @@ REGION_AllocUserRgnWithHandle(INT nRgn) { PROSRGNDATA pRgn; - INT Index; PGDI_TABLE_ENTRY Entry; pRgn = REGION_AllocRgnWithHandle(nRgn); if (pRgn) { - Index = GDI_HANDLE_GET_INDEX(pRgn->BaseObject.hHmgr); - Entry = &GdiHandleTable->Entries[Index]; + Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, pRgn->BaseObject.hHmgr); Entry->UserData = AllocateObjectAttr(); } return pRgn; @@ -2090,23 +2088,18 @@ FASTCALL RGNOBJAPI_Lock(HRGN hRgn, PRGN_ATTR *ppRgn_Attr) { - INT Index; PGDI_TABLE_ENTRY Entry; - PROSRGNDATA pRgn; PRGN_ATTR pRgn_Attr; - HANDLE pid; + PROSRGNDATA pRgn = NULL; pRgn = REGION_LockRgn(hRgn); - if (pRgn) + if (pRgn && GDIOBJ_OwnedByCurrentProcess(hRgn)) { - Index = GDI_HANDLE_GET_INDEX(hRgn); - Entry = &GdiHandleTable->Entries[Index]; + Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, hRgn); pRgn_Attr = Entry->UserData; - pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1); - - if ( pid == NtCurrentTeb()->ClientId.UniqueProcess && - pRgn_Attr ) + + if ( pRgn_Attr ) { _SEH2_TRY { @@ -2151,20 +2144,15 @@ FASTCALL RGNOBJAPI_Unlock(PROSRGNDATA pRgn) { - INT Index; PGDI_TABLE_ENTRY Entry; PRGN_ATTR pRgn_Attr; - HANDLE pid; - - if (pRgn) + + if (pRgn && GDIOBJ_OwnedByCurrentProcess(pRgn->BaseObject.hHmgr)) { - Index = GDI_HANDLE_GET_INDEX(pRgn->BaseObject.hHmgr); - Entry = &GdiHandleTable->Entries[Index]; + Entry = GDI_HANDLE_GET_ENTRY(GdiHandleTable, pRgn->BaseObject.hHmgr); pRgn_Attr = Entry->UserData; - pid = (HANDLE)((ULONG_PTR)Entry->ProcessId & ~0x1); - - if ( pid == NtCurrentTeb()->ClientId.UniqueProcess && - pRgn_Attr ) + + if ( pRgn_Attr ) { _SEH2_TRY {
13 years, 8 months
1
0
0
0
[janderwald] 51007: [MSAFD] - Correct calculating PollBufferSize - Found by DPH
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Mar 10 12:41:50 2011 New Revision: 51007 URL:
http://svn.reactos.org/svn/reactos?rev=51007&view=rev
Log: [MSAFD] - Correct calculating PollBufferSize - Found by DPH Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c Modified: trunk/reactos/dll/win32/msafd/misc/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msafd/misc/dllma…
============================================================================== --- trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/msafd/misc/dllmain.c [iso-8859-1] Thu Mar 10 12:41:50 2011 @@ -907,7 +907,7 @@ } PollInfo->HandleCount = j; - PollBufferSize = ((PCHAR)&PollInfo->Handles[j+1]) - ((PCHAR)PollInfo); + PollBufferSize = sizeof(AFD_POLL_INFO) + (PollInfo->HandleCount > 1 ? sizeof(HANDLE) * ( PollInfo->HandleCount - 1) : 0); /* Send IOCTL */ Status = NtDeviceIoControlFile((HANDLE)PollInfo->Handles[0].Handle,
13 years, 8 months
1
0
0
0
← Newer
1
...
18
19
20
21
22
23
24
...
28
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Results per page:
10
25
50
100
200