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
December
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
February 2007
----- 2024 -----
December 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
16 participants
265 discussions
Start a n
N
ew thread
[ion] 25802: - You all s^H^H^H^H^H^H^H^H^H Fix build error.
by ion@svn.reactos.org
Author: ion Date: Wed Feb 14 23:50:46 2007 New Revision: 25802 URL:
http://svn.reactos.org/svn/reactos?rev=25802&view=rev
Log: - You all s^H^H^H^H^H^H^H^H^H Fix build error. Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c Wed Feb 14 23:50:46 2007 @@ -932,7 +932,7 @@ * Now boot the kernel */ DiskStopFloppyMotor(); - MachVideoPrepareForReactOS(FrLdrBootType); + MachVideoPrepareForReactOS(FALSE); FrLdrStartup(0x2badb002); } Modified: trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/setupldr.c Wed Feb 14 23:50:46 2007 @@ -633,7 +633,7 @@ /* Now boot the kernel */ DiskStopFloppyMotor(); - MachVideoPrepareForReactOS(); + MachVideoPrepareForReactOS(TRUE); FrLdrStartup(0x2badb002); }
17 years, 10 months
1
0
0
0
[ion] 25801: - Linux sucks
by ion@svn.reactos.org
Author: ion Date: Wed Feb 14 23:47:43 2007 New Revision: 25801 URL:
http://svn.reactos.org/svn/reactos?rev=25801&view=rev
Log: - Linux sucks Modified: trunk/reactos/hal/halx86/generic/generic.rbuild Modified: trunk/reactos/hal/halx86/generic/generic.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/generic…
============================================================================== --- trunk/reactos/hal/halx86/generic/generic.rbuild (original) +++ trunk/reactos/hal/halx86/generic/generic.rbuild Wed Feb 14 23:47:43 2007 @@ -25,7 +25,7 @@ <define name="_DISABLE_TIDENTS" /> <define name="_NTHAL_" /> <define name="__USE_W32API" /> - <file>irq.s</file> + <file>irq.S</file> <file>halinit.c</file> <file>processor.c</file> <file>spinlock.c</file>
17 years, 10 months
1
0
0
0
[ion] 25800: - Fixup and enable my new HAL IRQL implementation from a couple of months ago, and remove the temporary Mm hacks from Dmitry Gorbachev, since DPCs don't interrupt DISPATCH_LEVEL Code anymore. - This fixes a critical system malfunction and architectural bug, as well as speeds up ReactOS incredibly -- setup takes seconds again, and boot is almost instantenous (except the Explorer loading bug). - Proper fix for bootvid regression that Aleksey "Fixed". Video mode is now properly setup w
by ion@svn.reactos.org
Author: ion Date: Wed Feb 14 23:30:33 2007 New Revision: 25800 URL:
http://svn.reactos.org/svn/reactos?rev=25800&view=rev
Log: - Fixup and enable my new HAL IRQL implementation from a couple of months ago, and remove the temporary Mm hacks from Dmitry Gorbachev, since DPCs don't interrupt DISPATCH_LEVEL Code anymore. - This fixes a critical system malfunction and architectural bug, as well as speeds up ReactOS incredibly -- setup takes seconds again, and boot is almost instantenous (except the Explorer loading bug). - Proper fix for bootvid regression that Aleksey "Fixed". Video mode is now properly setup wether in setup or non-setup mode, so bootvid works again. - Enable bootvid in freeldr.ini, currently using only /SOS mode since full-screen logo isn't implemented yet. Modified: trunk/reactos/base/setup/usetup/bootsup.c trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machpc.h trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h trunk/reactos/boot/freeldr/freeldr/include/machine.h trunk/reactos/boot/freeldr/freeldr/machine.c trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c trunk/reactos/hal/halx86/generic/generic.rbuild trunk/reactos/hal/halx86/generic/irq.S trunk/reactos/ntoskrnl/mm/balance.c trunk/reactos/ntoskrnl/mm/freelist.c trunk/reactos/ntoskrnl/mm/mdl.c trunk/reactos/ntoskrnl/mm/npool.c trunk/reactos/ntoskrnl/mm/pagefile.c trunk/reactos/ntoskrnl/mm/pageop.c Modified: trunk/reactos/base/setup/usetup/bootsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/bootsup.…
============================================================================== --- trunk/reactos/base/setup/usetup/bootsup.c (original) +++ trunk/reactos/base/setup/usetup/bootsup.c Wed Feb 14 23:30:33 2007 @@ -398,6 +398,13 @@ L"SystemPath", ArcPath); + /* Options=/SOS*/ + IniCacheInsertKey(IniSection, + NULL, + INSERT_LAST, + L"Options", + L"/SOS"); + /* Create "ReactOS_Debug" section */ IniSection = IniCacheAppendSection(IniCache, L"ReactOS_Debug"); @@ -421,7 +428,7 @@ NULL, INSERT_LAST, L"Options", - L"/DEBUGPORT=COM1 /NOGUIBOOT /SOS"); + L"/DEBUGPORT=COM1 /SOS"); /* Save the ini file */ IniCacheSave(IniCache, IniPath); Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c Wed Feb 14 23:30:33 2007 @@ -1106,9 +1106,16 @@ } VOID -PcVideoPrepareForReactOS(VOID) -{ - PcVideoSetMode80x50_80x43(); +PcVideoPrepareForReactOS(IN BOOLEAN Setup) +{ + if (Setup) + { + PcVideoSetMode80x50_80x43(); + } + else + { + PcVideoSetBiosMode(0x12); + } PcVideoHideShowTextCursor(FALSE); } Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxvideo.c Wed Feb 14 23:30:33 2007 @@ -234,7 +234,7 @@ } VOID -XboxVideoPrepareForReactOS(VOID) +XboxVideoPrepareForReactOS(IN BOOLEAN Setup) { XboxVideoClearScreenColor(MAKE_COLOR(0, 0, 0), TRUE); } Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machpc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machpc.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machpc.h Wed Feb 14 23:30:33 2007 @@ -44,7 +44,7 @@ VOID PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); VOID PcVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue); VOID PcVideoSync(VOID); -VOID PcVideoPrepareForReactOS(VOID); +VOID PcVideoPrepareForReactOS(IN BOOLEAN Setup); ULONG PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/machxbox.h Wed Feb 14 23:30:33 2007 @@ -45,7 +45,7 @@ VOID XboxVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); VOID XboxVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue); VOID XboxVideoSync(VOID); -VOID XboxVideoPrepareForReactOS(VOID); +VOID XboxVideoPrepareForReactOS(IN BOOLEAN Setup); VOID XboxMemInit(VOID); PVOID XboxMemReserveMemory(ULONG MbToReserve); Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/machine.h (original) +++ trunk/reactos/boot/freeldr/freeldr/include/machine.h Wed Feb 14 23:30:33 2007 @@ -52,7 +52,7 @@ VOID (*VideoSetPaletteColor)(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); VOID (*VideoGetPaletteColor)(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue); VOID (*VideoSync)(VOID); - VOID (*VideoPrepareForReactOS)(VOID); + VOID (*VideoPrepareForReactOS)(IN BOOLEAN Setup); ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); @@ -91,7 +91,7 @@ VOID MachVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue); VOID MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue); VOID MachVideoSync(VOID); -VOID MachVideoPrepareForReactOS(VOID); +VOID MachVideoPrepareForReactOS(IN BOOLEAN Setup); ULONG MachGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize); BOOLEAN MachDiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType); BOOLEAN @@ -128,7 +128,7 @@ #define MachVideoSetPaletteColor(Col, R, G, B) MachVtbl.VideoSetPaletteColor((Col), (R), (G), (B)) #define MachVideoGetPaletteColor(Col, R, G, B) MachVtbl.VideoGetPaletteColor((Col), (R), (G), (B)) #define MachVideoSync() MachVtbl.VideoSync() -#define MachVideoPrepareForReactOS() MachVtbl.VideoPrepareForReactOS() +#define MachVideoPrepareForReactOS(a) MachVtbl.VideoPrepareForReactOS(a) #define MachGetMemoryMap(MMap, Size) MachVtbl.GetMemoryMap((MMap), (Size)) #define MachDiskGetBootVolume(Drv, Start, Cnt, FsType) MachVtbl.DiskGetBootVolume((Drv), (Start), (Cnt), (FsType)) #define MachDiskGetSystemVolume(SysPath, RemPath, Dev, Drv, Start, Cnt, FsType) MachVtbl.DiskGetSystemVolume((SysPath), (RemPath), (Dev), (Drv), (Start), (Cnt), (FsType)) Modified: trunk/reactos/boot/freeldr/freeldr/machine.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/machi…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/machine.c (original) +++ trunk/reactos/boot/freeldr/freeldr/machine.c Wed Feb 14 23:30:33 2007 @@ -142,9 +142,9 @@ } VOID -MachVideoPrepareForReactOS(VOID) -{ - MachVtbl.VideoPrepareForReactOS(); +MachVideoPrepareForReactOS(IN BOOLEAN Setup) +{ + MachVtbl.VideoPrepareForReactOS(Setup); } ULONG Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c (original) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c Wed Feb 14 23:30:33 2007 @@ -932,7 +932,7 @@ * Now boot the kernel */ DiskStopFloppyMotor(); - MachVideoPrepareForReactOS(); + MachVideoPrepareForReactOS(FrLdrBootType); FrLdrStartup(0x2badb002); } Modified: trunk/reactos/hal/halx86/generic/generic.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/generic…
============================================================================== --- trunk/reactos/hal/halx86/generic/generic.rbuild (original) +++ trunk/reactos/hal/halx86/generic/generic.rbuild Wed Feb 14 23:30:33 2007 @@ -25,7 +25,7 @@ <define name="_DISABLE_TIDENTS" /> <define name="_NTHAL_" /> <define name="__USE_W32API" /> - <file>irql.c</file> + <file>irq.s</file> <file>halinit.c</file> <file>processor.c</file> <file>spinlock.c</file> Modified: trunk/reactos/hal/halx86/generic/irq.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/generic/irq.S?r…
============================================================================== --- trunk/reactos/hal/halx86/generic/irq.S (original) +++ trunk/reactos/hal/halx86/generic/irq.S Wed Feb 14 23:30:33 2007 @@ -282,7 +282,7 @@ and PCR[KPCR_IDR], eax /* Get the current IRQL and mask the IRQs in the PIC */ - movzx eax, byte ptr PCR[KPCR_IRQL] + mov eax, PCR[KPCR_IRQL] mov eax, KiI8259MaskTable[eax*4] or eax, PCR[KPCR_IDR] out 0x21, al @@ -309,9 +309,9 @@ _HalBeginSystemInterrupt@12: /* Convert to IRQ and call the handler */ - movzx edx, byte ptr [esp+8] - sub edx, PRIMARY_VECTOR_BASE - jmp HalpSysIntHandler[edx*4] + movzx ebx, byte ptr [esp+8] + sub ebx, PRIMARY_VECTOR_BASE + jmp HalpSysIntHandler[ebx*4] IRQ15: /* This is IRQ 15, check if it's spurious */ @@ -344,12 +344,12 @@ GenericIRQ: /* Return the current IRQL */ mov eax, [esp+12] - movzx ecx, byte ptr PCR[KPCR_IRQL] + mov ecx, PCR[KPCR_IRQL] mov [eax], cl /* Set the new IRQL */ movzx eax, byte ptr [esp+4] - mov PCR[KPCR_IRQL], al + mov PCR[KPCR_IRQL], eax /* Set IRQ mask in the PIC */ mov eax, KiI8259MaskTable[eax*4] @@ -359,7 +359,7 @@ out 0xA1, al /* Check to which PIC the EOI was sent */ - mov eax, edx + mov eax, ebx cmp eax, 8 jnb Pic1 @@ -396,7 +396,7 @@ /* Get the IRQL and check if it's a software interrupt */ movzx ecx, byte ptr [esp+4] - cmp byte ptr PCR[KPCR_IRQL], DISPATCH_LEVEL + cmp dword ptr PCR[KPCR_IRQL], DISPATCH_LEVEL jbe SkipMask2 /* Hardware interrupt, mask the appropriate IRQs in the PIC */ @@ -409,7 +409,7 @@ SkipMask2: /* Set IRQL and check if there are pending software interrupts */ - mov PCR[KPCR_IRQL], cl + mov PCR[KPCR_IRQL], ecx mov eax, PCR[KPCR_IRR] mov al, SoftIntByteTable[eax] cmp al, cl @@ -439,7 +439,7 @@ #endif /* Disable interrupts and check if IRQL is below DISPATCH_LEVEL */ - cmp byte ptr PCR[KPCR_IRQL], DISPATCH_LEVEL + cmp dword ptr PCR[KPCR_IRQL], DISPATCH_LEVEL cli jbe SkipMask @@ -453,7 +453,7 @@ SkipMask: /* Set the new IRQL and check if there's a pending software interrupt */ - mov PCR[KPCR_IRQL], cl + mov PCR[KPCR_IRQL], ecx mov eax, PCR[KPCR_IRR] mov al, SoftIntByteTable[eax] cmp al, cl @@ -466,8 +466,8 @@ #if DBG InvalidIrql: /* Set HIGH_LEVEL */ - movzx eax, byte ptr PCR[KPCR_IRQL] - mov byte ptr PCR[KPCR_IRQL], HIGH_LEVEL + mov eax, PCR[KPCR_IRQL] + mov dword ptr PCR[KPCR_IRQL], HIGH_LEVEL /* Bugcheck the system */ push 3 @@ -493,8 +493,7 @@ @KfRaiseIrql@4: /* Get the IRQL */ - xor eax, eax - mov al, PCR[KPCR_IRQL] + mov eax, PCR[KPCR_IRQL] movzx ecx, cl #if DBG @@ -532,13 +531,13 @@ SetIrql: /* Set the IRQL and return */ - mov PCR[KPCR_IRQL], cl + mov PCR[KPCR_IRQL], ecx ret #if DBG InvalidKfRaise: /* Set to passive */ - mov byte ptr PCR[KPCR_IRQL], PASSIVE_LEVEL + mov dword ptr PCR[KPCR_IRQL], PASSIVE_LEVEL /* Bugcheck the system */ push 9 @@ -555,7 +554,7 @@ _KeGetCurrentIrql@0: /* Return the IRQL */ - movzx eax, byte ptr PCR[KPCR_IRQL] + mov eax, PCR[KPCR_IRQL] ret .endfunc @@ -564,15 +563,14 @@ _KeRaiseIrqlToDpcLevel@0: /* Get the current IRQL */ - xor eax, eax - mov al, PCR[KPCR_IRQL] + mov eax, PCR[KPCR_IRQL] /* Set DISPATCH_LEVEL */ - mov byte ptr PCR[KPCR_IRQL], DISPATCH_LEVEL + mov dword ptr PCR[KPCR_IRQL], DISPATCH_LEVEL #if DBG /* Make sure we were not higher then dispatch */ - cmp al, DISPATCH_LEVEL + cmp eax, DISPATCH_LEVEL ja InvalidRaise #endif ret @@ -605,13 +603,13 @@ out 0xA1, al /* Return the old IRQL, enable interrupts and set to DISPATCH */ - mov al, PCR[KPCR_IRQL] - mov byte ptr PCR[KPCR_IRQL], DISPATCH_LEVEL + mov eax, PCR[KPCR_IRQL] + mov dword ptr PCR[KPCR_IRQL], DISPATCH_LEVEL popf #if DBG /* Validate raise */ - cmp al, DISPATCH_LEVEL + cmp eax, DISPATCH_LEVEL ja InvalidSyRaise #endif @@ -632,6 +630,8 @@ .globl _HalpApcInterrupt .func HalpApcInterrupt +Dr_hapc: DR_TRAP_FIXUP +V86_hapc: V86_TRAP_FIXUP _HalpApcInterrupt: /* Create fake interrupt stack */ @@ -679,6 +679,8 @@ .globl _HalpDispatchInterrupt .func HalpDispatchInterrupt +Dr_hdpc: DR_TRAP_FIXUP +V86_hdpc: V86_TRAP_FIXUP _HalpDispatchInterrupt: /* Create fake interrupt stack */ @@ -688,7 +690,7 @@ push eax /* Enter interrupt */ - INT_PROLOG hapc, DoPushFakeErrorCode + INT_PROLOG hdpc, DoPushFakeErrorCode .endfunc .globl _HalpDispatchInterrupt2ndEntry Modified: trunk/reactos/ntoskrnl/mm/balance.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/balance.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/balance.c (original) +++ trunk/reactos/ntoskrnl/mm/balance.c Wed Feb 14 23:30:33 2007 @@ -13,9 +13,6 @@ #include <ntoskrnl.h> #define NDEBUG #include <internal/debug.h> - -#undef KeAcquireSpinLock -#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); } #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitializeBalancer) Modified: trunk/reactos/ntoskrnl/mm/freelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/freelist.c (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c Wed Feb 14 23:30:33 2007 @@ -14,9 +14,6 @@ #include <ntoskrnl.h> #define NDEBUG #include <internal/debug.h> - -#undef KeAcquireSpinLock -#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); } #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitializePageList) Modified: trunk/reactos/ntoskrnl/mm/mdl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mdl.c?rev=2580…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mdl.c (original) +++ trunk/reactos/ntoskrnl/mm/mdl.c Wed Feb 14 23:30:33 2007 @@ -13,9 +13,6 @@ #include <ntoskrnl.h> #define NDEBUG #include <internal/debug.h> - -#undef KeAcquireSpinLock -#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); } #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitializeMdlImplementation) Modified: trunk/reactos/ntoskrnl/mm/npool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/npool.c?rev=25…
============================================================================== --- trunk/reactos/ntoskrnl/mm/npool.c (original) +++ trunk/reactos/ntoskrnl/mm/npool.c Wed Feb 14 23:30:33 2007 @@ -15,9 +15,6 @@ #include <ntoskrnl.h> #define NDEBUG #include <internal/debug.h> - -#undef KeAcquireSpinLock -#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); } #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MiInitializeNonPagedPool) Modified: trunk/reactos/ntoskrnl/mm/pagefile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pagefile.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pagefile.c (original) +++ trunk/reactos/ntoskrnl/mm/pagefile.c Wed Feb 14 23:30:33 2007 @@ -31,9 +31,6 @@ #define NDEBUG #include <internal/debug.h> -#undef KeAcquireSpinLock -#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); } - #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitPagingFile) #endif Modified: trunk/reactos/ntoskrnl/mm/pageop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pageop.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pageop.c (original) +++ trunk/reactos/ntoskrnl/mm/pageop.c Wed Feb 14 23:30:33 2007 @@ -13,9 +13,6 @@ #include <ntoskrnl.h> #define NDEBUG #include <internal/debug.h> - -#undef KeAcquireSpinLock -#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); } #if defined (ALLOC_PRAGMA) #pragma alloc_text(INIT, MmInitializePageOp)
17 years, 10 months
1
0
0
0
[ion] 25799: Object Manager fixes based on bug reports from Aleksey Bragin: - ObpReferenceProcessObjectByHandle: - Remove PAGED_CODE - Use InterlockedIncrement instead of InterlockedExchangeAdd. - ObpInsertHandleCount: Fix calculation of the handle database size, fixing potential pool corruption/overwrite situations. - ObpChargeQuotaForObject: Write proper code for charging the quota. - ObpDecrementHandleCount: - Get ObjectType from caller instead of doing the extra operation. - If there's no ha
by ion@svn.reactos.org
Author: ion Date: Wed Feb 14 20:51:48 2007 New Revision: 25799 URL:
http://svn.reactos.org/svn/reactos?rev=25799&view=rev
Log: Object Manager fixes based on bug reports from Aleksey Bragin: - ObpReferenceProcessObjectByHandle: - Remove PAGED_CODE - Use InterlockedIncrement instead of InterlockedExchangeAdd. - ObpInsertHandleCount: Fix calculation of the handle database size, fixing potential pool corruption/overwrite situations. - ObpChargeQuotaForObject: Write proper code for charging the quota. - ObpDecrementHandleCount: - Get ObjectType from caller instead of doing the extra operation. - If there's no handle database, then don't setup a handle entry. - ObpIncrementHandleCount is PAGED_CODE. - ObpCloseHandle: Do proper logic for determining if we should raise an exception, fail, or bugcheck the system when an invalid handle is being closed. - ObpSetHandleAttributes: - Not PAGED_CODE. - Allow operations on kernel objects. - Use the Access Protect Close Bit in the GrantedAccess instead of an OBJ_PROTECT flag in the ObAttributes. - ObpCloseHandleCallback: Sweep/Enumerate Routines are BOOLEAN, not VOID. - ObDuplicateObject: - Clear the audit mask if auditing isn't set. - Always duplicate OBJ_AUDIT_OBJECT_CLOSE if it's set. - Clear the handle entry before writing it. - Always propagate ACCESS_SYSTEM_SECURITY as a desired access. - ObFindHandleForObject: Use ObReferenceProcessHandleTable instead of directly accessing the pointer. - ObInsertObject: Dereference symbolic links when they collide during an insert, since a reference was already added. - NtDuplicateObject: Clear out the TargetHandle to assume failure. - ObpCaptureObjectName: Use RtlCopyMemory which is faster. - ObpAllocateObject: Fix check for quota usage. - ObCreateObjectType: - Make sure that the object type name is wchar-aligned. - Add support for LPC Waitable Ports. - Initialize Object Locks. Modified: trunk/reactos/ntoskrnl/include/internal/ex.h trunk/reactos/ntoskrnl/ob/obhandle.c trunk/reactos/ntoskrnl/ob/oblife.c Modified: trunk/reactos/ntoskrnl/include/internal/ex.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ex.h (original) +++ trunk/reactos/ntoskrnl/include/internal/ex.h Wed Feb 14 20:51:48 2007 @@ -336,7 +336,7 @@ /* HANDLE TABLE FUNCTIONS ***************************************************/ -typedef VOID +typedef BOOLEAN (NTAPI *PEX_SWEEP_HANDLE_CALLBACK)( PHANDLE_TABLE_ENTRY HandleTableEntry, HANDLE Handle, Modified: trunk/reactos/ntoskrnl/ob/obhandle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obhandle.c (original) +++ trunk/reactos/ntoskrnl/ob/obhandle.c Wed Feb 14 20:51:48 2007 @@ -15,9 +15,10 @@ #include <ntoskrnl.h> #define NDEBUG -#include <internal/debug.h> +#include <debug.h> PHANDLE_TABLE ObpKernelHandleTable = NULL; +ULONG ObpAccessProtectCloseBit = MAXIMUM_ALLOWED; #define TAG_OB_HANDLE TAG('O', 'b', 'H', 'd') @@ -69,7 +70,6 @@ ULONG Attributes; PETHREAD Thread = PsGetCurrentThread(); NTSTATUS Status; - PAGED_CODE(); /* Assume failure */ *Object = NULL; @@ -86,7 +86,7 @@ /* Reference ourselves */ ObjectHeader = OBJECT_TO_OBJECT_HEADER(Process); - InterlockedExchangeAdd(&ObjectHeader->PointerCount, 1); + InterlockedIncrement(&ObjectHeader->PointerCount); /* Return the pointer */ *Object = Process; @@ -249,7 +249,7 @@ /* Now we'll have two entries, and an entire DB */ i = 2; Size = sizeof(OBJECT_HANDLE_COUNT_DATABASE) + - sizeof(OBJECT_HANDLE_COUNT_ENTRY); + ((i - 1) * sizeof(OBJECT_HANDLE_COUNT_ENTRY)); } else { @@ -261,7 +261,7 @@ /* Add 4 more entries */ i += 4; - Size = OldSize += (4 * sizeof(OBJECT_HANDLE_COUNT_ENTRY)); + Size = OldSize += ((i - 1) * sizeof(OBJECT_HANDLE_COUNT_ENTRY)); } /* Allocate the DB */ @@ -395,7 +395,6 @@ { POBJECT_HEADER_QUOTA_INFO ObjectQuota; ULONG PagedPoolCharge, NonPagedPoolCharge; - PEPROCESS Process; /* Get quota information */ ObjectQuota = OBJECT_HEADER_TO_QUOTA_INFO(ObjectHeader); @@ -404,9 +403,6 @@ /* Check if this is a new object */ if (ObjectHeader->Flags & OB_FLAG_CREATE_INFO) { - /* Set the flag */ - *NewObject = TRUE; - /* Remove the flag */ ObjectHeader->Flags &= ~ OB_FLAG_CREATE_INFO; if (ObjectQuota) @@ -422,14 +418,19 @@ NonPagedPoolCharge = ObjectType->TypeInfo.DefaultNonPagedPoolCharge; } - /* - * Charge the quota - * FIXME: This is a *COMPLETE* guess and probably defintely not the way to do this. - */ - Process = PsGetCurrentProcess(); - Process->QuotaBlock->QuotaEntry[PagedPool].Usage += PagedPoolCharge; - Process->QuotaBlock->QuotaEntry[NonPagedPool].Usage += NonPagedPoolCharge; - ObjectHeader->QuotaBlockCharged = Process->QuotaBlock; + /* Charge the quota */ + ObjectHeader->QuotaBlockCharged = (PVOID)1; +#if 0 + PsChargeSharedPoolQuota(PsGetCurrentProcess(), + PagedPoolCharge, + NonPagedPoolCharge); +#endif + + /* Check if we don't have a quota block */ + if (!ObjectHeader->QuotaBlockCharged) return STATUS_QUOTA_EXCEEDED; + + /* Now set the flag */ + *NewObject = TRUE; } /* Return success */ @@ -459,10 +460,10 @@ NTAPI ObpDecrementHandleCount(IN PVOID ObjectBody, IN PEPROCESS Process, - IN ACCESS_MASK GrantedAccess) + IN ACCESS_MASK GrantedAccess, + IN POBJECT_TYPE ObjectType) { POBJECT_HEADER ObjectHeader; - POBJECT_TYPE ObjectType; LONG SystemHandleCount, ProcessHandleCount; LONG NewCount; KIRQL CalloutIrql; @@ -474,7 +475,6 @@ /* Get the object type and header */ ObjectHeader = OBJECT_TO_OBJECT_HEADER(ObjectBody); - ObjectType = ObjectHeader->Type; OBTRACE(OB_HANDLE_DEBUG, "%s - Decrementing count for: %p. HC LC %lx %lx\n", __FUNCTION__, @@ -540,6 +540,11 @@ i--; } } + else + { + /* No database, so no entry */ + HandleEntry = NULL; + } } /* Check if this is the last handle */ @@ -686,7 +691,10 @@ ExDestroyHandle(HandleTable, Handle, HandleEntry); /* Now decrement the handle count */ - ObpDecrementHandleCount(Body, PsGetCurrentProcess(), GrantedAccess); + ObpDecrementHandleCount(Body, + PsGetCurrentProcess(), + GrantedAccess, + ObjectType); /* Dereference the object as well */ ObDereferenceObject(Body); @@ -749,6 +757,7 @@ KIRQL CalloutIrql; KPROCESSOR_MODE ProbeMode; ULONG Total; + PAGED_CODE(); /* Get the object header and type */ ObjectHeader = OBJECT_TO_OBJECT_HEADER(Object); @@ -1359,7 +1368,8 @@ /* Decrement the handle count and detach */ ObpDecrementHandleCount(&ObjectHeader->Body, PsGetCurrentProcess(), - GrantedAccess); + GrantedAccess, + ObjectType); /* Detach and fail */ if (AttachedToProcess) KeUnstackDetachProcess(&ApcState); @@ -1596,7 +1606,8 @@ /* Decrement the handle count and detach */ ObpDecrementHandleCount(&ObjectHeader->Body, PsGetCurrentProcess(), - GrantedAccess); + GrantedAccess, + ObjectType); /* Handle extra references */ if (AdditionalReferences) @@ -1644,6 +1655,7 @@ KAPC_STATE ApcState; PHANDLE_TABLE_ENTRY HandleTableEntry; NTSTATUS Status; + PEPROCESS Process = PsGetCurrentProcess(); PAGED_CODE(); OBTRACE(OB_HANDLE_DEBUG, "%s - Closing handle: %lx\n", __FUNCTION__, Handle); @@ -1656,7 +1668,7 @@ Handle = ObKernelHandleToHandle(Handle); /* Check if we're not in the system process */ - if (PsGetCurrentProcess() != PsInitialSystemProcess) + if (Process != PsInitialSystemProcess) { /* Attach to the system process */ KeStackAttachProcess(&PsInitialSystemProcess->Pcb, &ApcState); @@ -1666,7 +1678,7 @@ else { /* Use the process's handle table */ - HandleTable = PsGetCurrentProcess()->ObjectTable; + HandleTable = Process->ObjectTable; } /* Enter a critical region to protect handle access */ @@ -1698,18 +1710,43 @@ /* Detach */ if (AttachedToProcess) KeUnstackDetachProcess(&ApcState); - /* Check if this was a user-mode caller with a valid debug port */ - if ((AccessMode != KernelMode) && - (PsGetCurrentProcess()->DebugPort)) - { - /* Raise an exception */ - Status = KeRaiseUserException(STATUS_INVALID_HANDLE); - } - else - { - /* Just return the status */ - Status = STATUS_INVALID_HANDLE; - } + /* Check if we have a valid handle that's not the process or thread */ + if ((Handle) && + (Handle != NtCurrentProcess()) && + (Handle != NtCurrentThread())) + { + /* Check if we came from user mode */ + if (AccessMode != KernelMode) + { + /* Check if we have no debug port */ + if (Process->DebugPort) + { + /* Make sure we're not attached */ + if (!KeIsAttachedProcess()) + { + /* Raise an exception */ + return KeRaiseUserException(STATUS_INVALID_HANDLE); + } + } + } + else + { + /* This is kernel mode. Check if we're exiting */ + if (!(PsIsThreadTerminating(PsGetCurrentThread())) && + (Process->Peb)) + { + /* Check if the debugger is enabled */ + if (KdDebuggerEnabled) + { + /* Bugcheck */ + KeBugCheckEx(0, (ULONG_PTR)Handle, 1, 0, 0); + } + } + } + } + + /* Set invalid status */ + Status = STATUS_INVALID_HANDLE; } /* Return status */ @@ -1742,15 +1779,6 @@ { POBP_SET_HANDLE_ATTRIBUTES_CONTEXT SetHandleInfo = (PVOID)Context; POBJECT_HEADER ObjectHeader = ObpGetHandleObject(HandleTableEntry); - PAGED_CODE(); - - /* Don't allow operations on kernel objects */ - if ((ObjectHeader->Flags & OB_FLAG_KERNEL_MODE) && - (SetHandleInfo->PreviousMode != KernelMode)) - { - /* Fail */ - return FALSE; - } /* Check if making the handle inheritable */ if (SetHandleInfo->Information.Inherit) @@ -1775,12 +1803,12 @@ if (SetHandleInfo->Information.ProtectFromClose) { /* Set the flag */ - HandleTableEntry->ObAttributes |= OBJ_PROTECT_CLOSE; + HandleTableEntry->GrantedAccess |= ObpAccessProtectCloseBit; } else { /* Otherwise, remove it */ - HandleTableEntry->ObAttributes &= ~OBJ_PROTECT_CLOSE; + HandleTableEntry->GrantedAccess &= ~ObpAccessProtectCloseBit; } /* Return success */ @@ -1809,7 +1837,7 @@ * @remarks None. * *--*/ -VOID +BOOLEAN NTAPI ObpCloseHandleCallback(IN PHANDLE_TABLE_ENTRY HandleTableEntry, IN HANDLE Handle, @@ -1823,6 +1851,7 @@ Handle, CloseContext->AccessMode, TRUE); + return TRUE; } /*++ @@ -2078,6 +2107,15 @@ ObDereferenceProcessHandleTable(SourceProcess); return Status; } + else + { + /* Check if we have to don't have to audit object close */ + if (!(HandleInformation.HandleAttributes & OBJ_AUDIT_OBJECT_CLOSE)) + { + /* Then there is no audit mask */ + AuditMask = 0; + } + } /* Check if there's no target process */ if (!TargetProcess) @@ -2142,6 +2180,12 @@ /* Duplicate them */ HandleAttributes = HandleInformation.HandleAttributes; } + else + { + /* Don't allow caller to bypass auditing */ + HandleAttributes |= HandleInformation.HandleAttributes & + OBJ_AUDIT_OBJECT_CLOSE; + } /* Check if we're duplicating the access */ if (Options & DUPLICATE_SAME_ACCESS) DesiredAccess = SourceAccess; @@ -2151,6 +2195,7 @@ ObjectType = ObjectHeader->Type; /* Fill out the entry */ + RtlZeroMemory(&NewHandleEntry, sizeof(HANDLE_TABLE_ENTRY)); NewHandleEntry.Object = ObjectHeader; NewHandleEntry.ObAttributes |= HandleAttributes & OBJ_HANDLE_ATTRIBUTES; @@ -2162,8 +2207,9 @@ &ObjectType->TypeInfo.GenericMapping); } - /* Set the target access */ - TargetAccess = DesiredAccess; + /* Set the target access, always propagate ACCESS_SYSTEM_SECURITY */ + TargetAccess = DesiredAccess & (ObjectType->TypeInfo.ValidAccessMask | + ACCESS_SYSTEM_SECURITY); NewHandleEntry.GrantedAccess = TargetAccess; /* Check if we're asking for new access */ @@ -2242,7 +2288,8 @@ /* Undo the increment */ ObpDecrementHandleCount(SourceObject, TargetProcess, - TargetAccess); + TargetAccess, + ObjectType); /* Deference the object and set failure status */ ObDereferenceObject(SourceObject); @@ -2623,9 +2670,11 @@ { OBP_FIND_HANDLE_DATA FindData; BOOLEAN Result = FALSE; + PVOID ObjectTable; /* Make sure we have an object table */ - if (Process->ObjectTable) + ObjectTable = ObReferenceProcessHandleTable(Process); + if (ObjectTable) { /* Check if we have an object */ if (Object) @@ -2652,6 +2701,9 @@ /* Set success */ Result = TRUE; } + + /* Let go of the table */ + ObDereferenceProcessHandleTable(Process); } /* Return the result */ @@ -2859,6 +2911,14 @@ } else { + /* Check if this was a symbolic link */ + if (OBJECT_TO_OBJECT_HEADER(InsertObject)->Type == + ObSymbolicLinkType) + { + /* Dereference it */ + ObDereferenceObject(InsertObject); + } + /* Caller wanted to create a new object, fail */ Status = STATUS_OBJECT_NAME_COLLISION; } @@ -3094,7 +3154,6 @@ HANDLE hTarget; KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); NTSTATUS Status = STATUS_SUCCESS; - PAGED_CODE(); OBTRACE(OB_HANDLE_DEBUG, "%s - Duplicating handle: %lx for %lx into %lx.\n", __FUNCTION__, @@ -3108,8 +3167,9 @@ /* Enter SEH */ _SEH_TRY { - /* Probe the handle */ + /* Probe the handle and assume failure */ ProbeForWriteHandle(TargetHandle); + *TargetHandle = NULL; } _SEH_HANDLE { Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=2…
============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c Wed Feb 14 20:51:48 2007 @@ -398,7 +398,7 @@ else { /* Copy the name */ - RtlMoveMemory(StringBuffer, LocalName.Buffer, StringLength); + RtlCopyMemory(StringBuffer, LocalName.Buffer, StringLength); StringBuffer[StringLength / sizeof(WCHAR)] = UNICODE_NULL; } } @@ -603,11 +603,12 @@ else { /* Check if we have quota */ - if ((ObjectCreateInfo->PagedPoolCharge != - ObjectType->TypeInfo.DefaultPagedPoolCharge) || - (ObjectCreateInfo->NonPagedPoolCharge != - ObjectType->TypeInfo.DefaultNonPagedPoolCharge) || - (ObjectCreateInfo->SecurityDescriptorCharge > 2048) || + if ((((ObjectCreateInfo->PagedPoolCharge != + ObjectType->TypeInfo.DefaultPagedPoolCharge) || + (ObjectCreateInfo->NonPagedPoolCharge != + ObjectType->TypeInfo.DefaultNonPagedPoolCharge) || + (ObjectCreateInfo->SecurityDescriptorCharge > 2048)) && + (PsGetCurrentProcess() != PsInitialSystemProcess)) || (ObjectCreateInfo->Attributes & OBJ_EXCLUSIVE)) { /* Set quota size */ @@ -1010,6 +1011,7 @@ /* Verify parameters */ if (!(TypeName) || !(TypeName->Length) || + (TypeName->Length % sizeof(WCHAR)) || !(ObjectTypeInitializer) || (ObjectTypeInitializer->Length != sizeof(*ObjectTypeInitializer)) || (ObjectTypeInitializer->InvalidAttributes & ~OBJ_VALID_ATTRIBUTES) || @@ -1167,7 +1169,12 @@ LocalObjectType->DefaultObject = (PVOID)FIELD_OFFSET(FILE_OBJECT, Event); } - /* FIXME: When LPC stops sucking, add a hack for Waitable Ports */ + else if ((TypeName->Length == 24) && !(wcscmp(TypeName->Buffer, L"WaitablePort"))) + { + /* Wait on the LPC Port's object directly */ + LocalObjectType->DefaultObject = (PVOID)FIELD_OFFSET(LPCP_PORT_OBJECT, + WaitEvent); + } else { /* No default Object */ @@ -1176,6 +1183,11 @@ /* Initialize Object Type components */ ExInitializeResourceLite(&LocalObjectType->Mutex); + for (i = 0; i < 4; i++) + { + /* Initialize the object locks */ + ExInitializeResourceLite(&LocalObjectType->ObjectLocks[i]); + } InitializeListHead(&LocalObjectType->TypeList); /* Lock the object type */
17 years, 10 months
1
0
0
0
[tretiakov] 25798: Post WM_INPUTLANGCHANGE to thread's focus windows when keyboard layout is changed.
by tretiakov@svn.reactos.org
Author: tretiakov Date: Wed Feb 14 16:00:38 2007 New Revision: 25798 URL:
http://svn.reactos.org/svn/reactos?rev=25798&view=rev
Log: Post WM_INPUTLANGCHANGE to thread's focus windows when keyboard layout is changed. Modified: trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c Modified: trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/testsets…
============================================================================== --- trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c (original) +++ trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c Wed Feb 14 16:00:38 2007 @@ -240,7 +240,10 @@ SubclassWnd(GetDlgItem(hDlg, IDC_EDIT2), L"Edit2"); SubclassWnd(GetDlgItem(hDlg, IDC_KLID), L"Klid"); SubclassWnd(GetDlgItem(hDlg, IDC_HANDLE), L"Handle"); - SubclassWnd(GetDlgItem(hDlg, ID_CANCEL), L"Button"); + SubclassWnd(GetDlgItem(hDlg, ID_CANCEL), L"CancelB"); + SubclassWnd(GetDlgItem(hDlg, IDC_ACTIVATE), L"ActivateB"); + SubclassWnd(GetDlgItem(hDlg, IDC_REFRESH), L"RefreshB"); + SubclassWnd(GetDlgItem(hDlg, IDC_UNLOAD), L"UnloadB"); CheckRadioButton(hDlg, IDC_FROMLIST, IDC_FROMEDIT, IDC_FROMLIST); SetWindowText(GetDlgItem(hDlg, IDC_KLID), L"00000419"); @@ -262,10 +265,12 @@ { if((hKl = GetActivateHandle(hDlg)) != INVALID_HANDLE_VALUE) { - if(!ActivateKeyboardLayout(hKl, GetActivateFlags(hDlg))) + if(!(hKl = ActivateKeyboardLayout(hKl, GetActivateFlags(hDlg)))) FormatBox(hDlg, MB_ICONERROR, L"Error", L"ActivateKeyboardLayout() failed. %d", GetLastError()); else UpdateData(hDlg); + //FormatBox(hDlg, 0, L"Activated", L"Prev - %x, err - %d.", hKl, + // GetLastError()); } else MessageBox(hDlg, L"No item selected", L"Error", MB_ICONERROR); break; Modified: trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c Wed Feb 14 16:00:38 2007 @@ -321,12 +321,22 @@ static PKBL UserActivateKbl(PW32THREAD Thread, PKBL pKbl) { PKBL Prev; + MSG Msg; Prev = Thread->KeyboardLayout; Prev->RefCount--; Thread->KeyboardLayout = pKbl; pKbl->RefCount++; + // Post WM_INPUTLANGCHANGE to thread's focus window + + Msg.hwnd = Thread->MessageQueue->FocusWindow; + Msg.message = WM_INPUTLANGCHANGE; + Msg.wParam = 0; // Charset. FIXME: what is this? + Msg.lParam = (LPARAM)pKbl->hkl; // klid + + MsqPostMessage(Thread->MessageQueue, &Msg, FALSE, QS_POSTMESSAGE); + return Prev; } @@ -419,9 +429,9 @@ _SEH_TRY { - ProbeForWrite(lpszName, 9*sizeof(WCHAR), 1); + ProbeForWrite(lpszName, KL_NAMELENGTH*sizeof(WCHAR), 1); pKbl = PsGetCurrentThreadWin32Thread()->KeyboardLayout; - RtlCopyMemory(lpszName, pKbl->Name, 9*sizeof(WCHAR)); + RtlCopyMemory(lpszName, pKbl->Name, KL_NAMELENGTH*sizeof(WCHAR)); ret = TRUE; } _SEH_HANDLE @@ -488,17 +498,27 @@ { PKBL pKbl; HKL Ret = NULL; + PW32THREAD pWThread; UserEnterExclusive(); pKbl = UserHklToKbl(hKl); + //FIXME: Respect flags! + if(pKbl) { - pKbl = UserActivateKbl(PsGetCurrentThreadWin32Thread(), pKbl); - Ret = pKbl->hkl; - - //FIXME: Respect flags! + pWThread = PsGetCurrentThreadWin32Thread(); + + if(pWThread->KeyboardLayout->hkl == hKl) + { + Ret = hKl; + } + else + { + pKbl = UserActivateKbl(pWThread, pKbl); + Ret = pKbl->hkl; + } } UserLeave();
17 years, 10 months
1
0
0
0
[tretiakov] 25797: - Make NtUserLoadKeyboardLayoutEx accept 6 params - Always get default locale from ntoskrnl - Fix some small bugs
by tretiakov@svn.reactos.org
Author: tretiakov Date: Tue Feb 13 22:50:06 2007 New Revision: 25797 URL:
http://svn.reactos.org/svn/reactos?rev=25797&view=rev
Log: - Make NtUserLoadKeyboardLayoutEx accept 6 params - Always get default locale from ntoskrnl - Fix some small bugs Modified: trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c trunk/reactos/config.template.rbuild trunk/reactos/dll/win32/user32/windows/input.c trunk/reactos/include/reactos/win32k/ntuser.h trunk/reactos/subsystems/win32/win32k/include/input.h trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c trunk/reactos/tools/nci/w32ksvc.db Modified: trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/testsets…
============================================================================== --- trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c (original) +++ trunk/reactos/base/applications/testsets/user32/kbdlayout/kbdlayout.c Tue Feb 13 22:50:06 2007 @@ -332,6 +332,7 @@ case WM_INPUTLANGCHANGEREQUEST: { FormatMsg(L"dlg WM_INPUTLANGCHANGEREQUEST lParam=%x wParam=%x\n", lParam, wParam); + UpdateData(hDlg); return FALSE; } Modified: trunk/reactos/config.template.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/config.template.rbuild?rev…
============================================================================== --- trunk/reactos/config.template.rbuild (original) +++ trunk/reactos/config.template.rbuild Tue Feb 13 22:50:06 2007 @@ -49,6 +49,8 @@ 5 = gcc -O3 with -mpreferred-stack-boundary=2 --> <property name="OPTIMIZE" value="1" /> + + <!-- Whether to compile for an uniprocessor or multiprocessor machine. --> Modified: trunk/reactos/dll/win32/user32/windows/input.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/i…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/input.c (original) +++ trunk/reactos/dll/win32/user32/windows/input.c Tue Feb 13 22:50:06 2007 @@ -300,7 +300,7 @@ { return NtUserLoadKeyboardLayoutEx( strtoul(pwszKLID, NULL, 16), - Flags); + Flags, 0, 0, 0, 0); } @@ -315,7 +315,7 @@ // We will do things our own way. return NtUserLoadKeyboardLayoutEx( wcstoul(pwszKLID, NULL, 16), - Flags); + Flags, 0, 0, 0, 0); } Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h Tue Feb 13 22:50:06 2007 @@ -1217,10 +1217,14 @@ ); HKL -NTAPI -NtUserLoadKeyboardLayoutEx( - LCID LocaleId, - UINT Flags); +STDCALL +NtUserLoadKeyboardLayoutEx( + IN DWORD dwKLID, + IN UINT Flags, + IN DWORD Unused1, + IN DWORD Unused2, + IN DWORD Unused3, + IN DWORD Unused4); BOOL NTAPI Modified: trunk/reactos/subsystems/win32/win32k/include/input.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/input.h (original) +++ trunk/reactos/subsystems/win32/win32k/include/input.h Tue Feb 13 22:50:06 2007 @@ -12,7 +12,7 @@ HANDLE hModule; ULONG RefCount; HKL hkl; - LCID lcid; + DWORD klid; // Low word - language id. High word - device id. } KBL, *PKBL; #define KBL_UNLOADED 0x20000000 Modified: trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c Tue Feb 13 22:50:06 2007 @@ -17,7 +17,6 @@ #include <debug.h> PKBL KBLList = NULL; // Keyboard layout list. -PKBL DefaultKL = NULL; typedef PVOID (*KbdLayerDescriptor)(VOID); NTSTATUS STDCALL LdrGetProcedureAddress(PVOID module, @@ -193,13 +192,13 @@ return TRUE; } -static PKBL UserLoadDllAndCreateKbl(LCID LocaleId) +static PKBL UserLoadDllAndCreateKbl(DWORD LocaleId) { PKBL NewKbl; ULONG hKl; LANGID langid; - NewKbl = ExAllocatePool(PagedPool, sizeof(NewKbl)); + NewKbl = ExAllocatePool(PagedPool, sizeof(KBL)); if(!NewKbl) { @@ -229,7 +228,7 @@ else hKl |= hKl << 16; NewKbl->hkl = (HKL) hKl; - NewKbl->lcid = LocaleId; + NewKbl->klid = LocaleId; NewKbl->Flags = 0; NewKbl->RefCount = 0; @@ -238,7 +237,6 @@ BOOL UserInitDefaultKeyboardLayout() { - LCID LocaleId; NTSTATUS Status; @@ -252,27 +250,60 @@ DPRINT("DefaultLocale = %08lx\n", LocaleId); } - if(!NT_SUCCESS(Status) || !(DefaultKL = UserLoadDllAndCreateKbl(LocaleId))) + if(!NT_SUCCESS(Status) || !(KBLList = UserLoadDllAndCreateKbl(LocaleId))) { DPRINT1("Trying to load US Keyboard Layout.\n"); LocaleId = 0x409; - if(!(DefaultKL = UserLoadDllAndCreateKbl(LocaleId))) + if(!(KBLList = UserLoadDllAndCreateKbl(LocaleId))) { DPRINT1("Failed to load any Keyboard Layout\n"); return FALSE; } } - InitializeListHead(&DefaultKL->List); - KBLList = DefaultKL; + InitializeListHead(&KBLList->List); return TRUE; } - PKBL W32kGetDefaultKeyLayout(VOID) { - return DefaultKL; + LCID LocaleId; + NTSTATUS Status; + PKBL pKbl; + + // This is probably wrong... + // I need to do more research. + Status = ZwQueryDefaultLocale(FALSE, &LocaleId); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Could not get default locale (%08lx).\n", Status); + DPRINT1("Assuming default locale = 0x409 (US).\n"); + LocaleId = 0x409; + } + + pKbl = KBLList; + do + { + if(pKbl->klid == LocaleId) + { + return pKbl; + } + + pKbl = (PKBL) pKbl->List.Flink; + } while(pKbl != KBLList); + + DPRINT("Loading new default keyboard layout.\n"); + pKbl = UserLoadDllAndCreateKbl(LocaleId); + + if(!pKbl) + { + DPRINT1("Failed to load %x!!! Returning any availableKL.\n", LocaleId); + return KBLList; + } + + InsertTailList(&KBLList->List, &pKbl->List); + return pKbl; } static PKBL UserHklToKbl(HKL hKl) @@ -298,6 +329,8 @@ return Prev; } + +/* EXPORTS *******************************************************************/ HKL FASTCALL UserGetKeyboardLayout( @@ -326,8 +359,6 @@ ObDereferenceObject(Thread); return Ret; } - -/* EXPORTS *******************************************************************/ UINT STDCALL @@ -408,8 +439,12 @@ HKL STDCALL NtUserLoadKeyboardLayoutEx( - IN LCID LocaleId, - IN UINT Flags) + IN DWORD dwKLID, + IN UINT Flags, + IN DWORD Unused1, + IN DWORD Unused2, + IN DWORD Unused3, + IN DWORD Unused4) { HKL Ret = NULL; PKBL pKbl; @@ -419,7 +454,7 @@ pKbl = KBLList; do { - if(pKbl->lcid == LocaleId) + if(pKbl->klid == dwKLID) { Ret = pKbl->hkl; goto the_end; @@ -428,7 +463,13 @@ pKbl = (PKBL) pKbl->List.Flink; } while(pKbl != KBLList); - pKbl = UserLoadDllAndCreateKbl(LocaleId); + pKbl = UserLoadDllAndCreateKbl(dwKLID); + + if(!pKbl) + { + goto the_end; + } + InsertTailList(&KBLList->List, &pKbl->List); Ret = pKbl->hkl; Modified: trunk/reactos/tools/nci/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/nci/w32ksvc.db?rev=2…
============================================================================== --- trunk/reactos/tools/nci/w32ksvc.db (original) +++ trunk/reactos/tools/nci/w32ksvc.db Tue Feb 13 22:50:06 2007 @@ -428,7 +428,7 @@ NtUserIsClipboardFormatAvailable 1 NtUserKillSystemTimer 2 NtUserKillTimer 2 -NtUserLoadKeyboardLayoutEx 2 +NtUserLoadKeyboardLayoutEx 6 NtUserLockWindowStation 1 NtUserLockWindowUpdate 1 NtUserLockWorkStation 0
17 years, 10 months
1
0
0
0
[greatlrd] 25796: small prepare for rished20 sync for wine. so the sync goes allot easy update richedit.h adding tom.h <- from wine cvs 11/2-2007 the tom.idl does not exists in windows ?
by greatlrd@svn.reactos.org
Author: greatlrd Date: Tue Feb 13 00:23:32 2007 New Revision: 25796 URL:
http://svn.reactos.org/svn/reactos?rev=25796&view=rev
Log: small prepare for rished20 sync for wine. so the sync goes allot easy update richedit.h adding tom.h <- from wine cvs 11/2-2007 the tom.idl does not exists in windows ? Added: trunk/reactos/include/reactos/wine/tom.h (with props) Modified: trunk/reactos/include/psdk/richedit.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/include/psdk/richedit.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/richedit.h?re…
Added: trunk/reactos/include/reactos/wine/tom.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/tom.h…
17 years, 10 months
1
0
0
0
[greatlrd] 25795: merge r25794 from trunk to 0.3.1 it fixing follow thing : patch from Physicus, implement TOOLTIPS_NotifyFormat, it now retrurn the type of the string if it unicode or ansi. before it did not return any type at all. it did a heap crash from downloader mangers when it try figout what type of sting the toolstips use. it is tested in 0.3.1 and not whole implemnent is tested yet. it should be right for all case.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Mon Feb 12 21:39:09 2007 New Revision: 25795 URL:
http://svn.reactos.org/svn/reactos?rev=25795&view=rev
Log: merge r25794 from trunk to 0.3.1 it fixing follow thing : patch from Physicus, implement TOOLTIPS_NotifyFormat, it now retrurn the type of the string if it unicode or ansi. before it did not return any type at all. it did a heap crash from downloader mangers when it try figout what type of sting the toolstips use. it is tested in 0.3.1 and not whole implemnent is tested yet. it should be right for all case. Modified: branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/comctl32_ros.diff branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/tooltips.c Modified: branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/comctl32_ros.diff URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/comctl32_ros.diff (original) +++ branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/comctl32_ros.diff Mon Feb 12 21:39:09 2007 @@ -107,3 +107,43 @@ case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); return FALSE; + +Index: tooltips.c +=================================================================== +--- tooltips.c (revision 25790) ++++ tooltips.c (working copy) +@@ -2450,7 +2450,34 @@ + TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam) + { + FIXME ("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam); ++ TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); ++ TTTOOL_INFO *toolPtr = infoPtr->tools; ++ INT nResult; + ++ if (lParam == NF_QUERY) ++ { ++ if (toolPtr->bNotifyUnicode) ++ { ++ return NFR_UNICODE; ++ } else { ++ return NFR_ANSI; ++ } ++ } ++ else if (lParam == NF_REQUERY) ++ { ++ nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT, ++ (WPARAM)hwnd, (LPARAM)NF_QUERY); ++ if (nResult == NFR_ANSI) { ++ toolPtr->bNotifyUnicode = FALSE; ++ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n"); ++ } else if (nResult == NFR_UNICODE) { ++ toolPtr->bNotifyUnicode = TRUE; ++ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n"); ++ } else { ++ TRACE (" -- WM_NOTIFYFORMAT returns: error!\n"); ++ } ++ return nResult; ++ } + return 0; + } + Modified: branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/tooltips.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/dll/wi…
============================================================================== --- branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/tooltips.c (original) +++ branches/ros-branch-0_3_1/reactos/dll/win32/comctl32/tooltips.c Mon Feb 12 21:39:09 2007 @@ -2450,7 +2450,34 @@ TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam) { FIXME ("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam); - + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); + TTTOOL_INFO *toolPtr = infoPtr->tools; + INT nResult; + + if (lParam == NF_QUERY) + { + if (toolPtr->bNotifyUnicode) + { + return NFR_UNICODE; + } else { + return NFR_ANSI; + } + } + else if (lParam == NF_REQUERY) + { + nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT, + (WPARAM)hwnd, (LPARAM)NF_QUERY); + if (nResult == NFR_ANSI) { + toolPtr->bNotifyUnicode = FALSE; + TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n"); + } else if (nResult == NFR_UNICODE) { + toolPtr->bNotifyUnicode = TRUE; + TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n"); + } else { + TRACE (" -- WM_NOTIFYFORMAT returns: error!\n"); + } + return nResult; + } return 0; }
17 years, 10 months
1
0
0
0
[greatlrd] 25794: patch from Physicus, implement TOOLTIPS_NotifyFormat, it now retrurn the type of the string if it unicode or ansi. before it did not return any type at all. it did a heap crash from downloader mangers when it try figout what type of sting the toolstips use. it is tested in 0.3.1 and not whole implemnent is tested yet. it should be right for all case.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Mon Feb 12 21:37:05 2007 New Revision: 25794 URL:
http://svn.reactos.org/svn/reactos?rev=25794&view=rev
Log: patch from Physicus, implement TOOLTIPS_NotifyFormat, it now retrurn the type of the string if it unicode or ansi. before it did not return any type at all. it did a heap crash from downloader mangers when it try figout what type of sting the toolstips use. it is tested in 0.3.1 and not whole implemnent is tested yet. it should be right for all case. Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff trunk/reactos/dll/win32/comctl32/tooltips.c Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
============================================================================== --- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff (original) +++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff Mon Feb 12 21:37:05 2007 @@ -107,3 +107,43 @@ case WM_SYSCOLORCHANGE: COMCTL32_RefreshSysColors(); return FALSE; + +Index: tooltips.c +=================================================================== +--- tooltips.c (revision 25790) ++++ tooltips.c (working copy) +@@ -2450,7 +2450,34 @@ + TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam) + { + FIXME ("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam); ++ TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); ++ TTTOOL_INFO *toolPtr = infoPtr->tools; ++ INT nResult; + ++ if (lParam == NF_QUERY) ++ { ++ if (toolPtr->bNotifyUnicode) ++ { ++ return NFR_UNICODE; ++ } else { ++ return NFR_ANSI; ++ } ++ } ++ else if (lParam == NF_REQUERY) ++ { ++ nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT, ++ (WPARAM)hwnd, (LPARAM)NF_QUERY); ++ if (nResult == NFR_ANSI) { ++ toolPtr->bNotifyUnicode = FALSE; ++ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n"); ++ } else if (nResult == NFR_UNICODE) { ++ toolPtr->bNotifyUnicode = TRUE; ++ TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n"); ++ } else { ++ TRACE (" -- WM_NOTIFYFORMAT returns: error!\n"); ++ } ++ return nResult; ++ } + return 0; + } + Modified: trunk/reactos/dll/win32/comctl32/tooltips.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/tooltip…
============================================================================== --- trunk/reactos/dll/win32/comctl32/tooltips.c (original) +++ trunk/reactos/dll/win32/comctl32/tooltips.c Mon Feb 12 21:37:05 2007 @@ -2450,7 +2450,34 @@ TOOLTIPS_NotifyFormat (HWND hwnd, WPARAM wParam, LPARAM lParam) { FIXME ("hwnd=%p wParam=%x lParam=%lx\n", hwnd, wParam, lParam); - + TOOLTIPS_INFO *infoPtr = TOOLTIPS_GetInfoPtr (hwnd); + TTTOOL_INFO *toolPtr = infoPtr->tools; + INT nResult; + + if (lParam == NF_QUERY) + { + if (toolPtr->bNotifyUnicode) + { + return NFR_UNICODE; + } else { + return NFR_ANSI; + } + } + else if (lParam == NF_REQUERY) + { + nResult = (INT) SendMessageW (toolPtr->hwnd, WM_NOTIFYFORMAT, + (WPARAM)hwnd, (LPARAM)NF_QUERY); + if (nResult == NFR_ANSI) { + toolPtr->bNotifyUnicode = FALSE; + TRACE(" -- WM_NOTIFYFORMAT returns: NFR_ANSI\n"); + } else if (nResult == NFR_UNICODE) { + toolPtr->bNotifyUnicode = TRUE; + TRACE(" -- WM_NOTIFYFORMAT returns: NFR_UNICODE\n"); + } else { + TRACE (" -- WM_NOTIFYFORMAT returns: error!\n"); + } + return nResult; + } return 0; }
17 years, 10 months
1
0
0
0
[fireball] 25793: Merge 25729 (calc.exe fix)
by fireball@svn.reactos.org
Author: fireball Date: Mon Feb 12 19:38:36 2007 New Revision: 25793 URL:
http://svn.reactos.org/svn/reactos?rev=25793&view=rev
Log: Merge 25729 (calc.exe fix) Modified: branches/ros-branch-0_3_1/reactos/base/applications/calc/winecalc.c Modified: branches/ros-branch-0_3_1/reactos/base/applications/calc/winecalc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_1/reactos/base/a…
============================================================================== --- branches/ros-branch-0_3_1/reactos/base/applications/calc/winecalc.c (original) +++ branches/ros-branch-0_3_1/reactos/base/applications/calc/winecalc.c Mon Feb 12 19:38:36 2007 @@ -2882,16 +2882,16 @@ MessageBeep(0); } - if (point) { - p = calc->buffer; - n = _tcslen(p) - 1; - while (*(p+n) && - *(p+n) != TEXT('.') && - *(p+n) == TEXT('0')) { - calc->buffer[n] = TEXT('\0'); - n--; - } - } + //if (point) { + // p = calc->buffer; + // n = _tcslen(p) - 1; + // while (*(p+n) && + // *(p+n) != TEXT('.') && + // *(p+n) == TEXT('0')) { + // calc->buffer[n] = TEXT('\0'); + // n--; + // } + //} // remove leading zeros
17 years, 10 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
27
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
Results per page:
10
25
50
100
200