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
September 2010
----- 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
18 participants
278 discussions
Start a n
N
ew thread
[khornicek] 48920: Merge 48917
by khornicek@svn.reactos.org
Author: khornicek Date: Tue Sep 28 14:41:18 2010 New Revision: 48920 URL:
http://svn.reactos.org/svn/reactos?rev=48920&view=rev
Log: Merge 48917 Modified: branches/ros-branch-0_3_12/reactos/dll/win32/kernel32/misc/ (props changed) branches/ros-branch-0_3_12/reactos/dll/win32/kernel32/misc/lang.c Propchange: branches/ros-branch-0_3_12/reactos/dll/win32/kernel32/misc/ ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Tue Sep 28 14:41:18 2010 @@ -1,0 +1,5 @@ +/branches/header-work/dll/win32/kernel32/misc:45691-47721 +/branches/reactos-yarotows/dll/win32/kernel32/misc:46372,46848,46966,47800,48026,48064 +/branches/ros-amd64-bringup/dll/win32/kernel32/misc:36852 +/branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc:34711-34712,34741,34743,34770,34780-34782,34803,34812,34839,34842,34864,34870,34874,34877,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35655,35683,35739,35746,35762,35771,35777,35781,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36011-36013,36172,36360,36380,36388-36389,36393,36397,36443,36445,36475,36502-36503,36505,36570,36614,36852,36898-36899,36930,36936,36949,36951,36958,36961,36964,36969,36972,36987-36988,36990,36992,37019,37322-37323,37333-37334,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38092,38100,38148-38151,38264-38265,38268,38355,39151,39333,39335,39345,39639,40120,40122-40123,40125,40127-40128,40155,40247,40324,40608,40753,40926-40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41070,41082-41086,41097-41098,41101,41449,41479-41480,41483-41485,41499-41500,41502,41531,41536,41540,41546-41547,41549,43080,43426,43451,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43836,43838-43840,43852,43857-43858,43860,43905-43907,43952,43954,43965,43969,43979,43981,43992,44002,44036-44037,44039-44040,44044-44045,44053,44065,44095,44123,44143-44144,44205,44238,44257,44259,44294,44338-44339,44385,44389,44391,44426,44460,44467-44468,44470-44471,44499,44501,44503-44504,44506,44510-44512,44521,44523-44526,44530,44540,44601,44634,44639,44772,44818,45124,45126-45127,45430,46394,46404,46478,46511,46523-46524,46526,46534-46535,46537-46539,46589,46805,46868,47472,47846-47847,47878,47882 +/trunk/reactos/dll/win32/kernel32/misc:48917 Modified: branches/ros-branch-0_3_12/reactos/dll/win32/kernel32/misc/lang.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_12/reactos/dll/w…
============================================================================== --- branches/ros-branch-0_3_12/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_12/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] Tue Sep 28 14:41:18 2010 @@ -1765,7 +1765,7 @@ } else { - memcpy( lpLCData, ch + 1, *ch * sizeof(WCHAR) ); + memcpy( lpLCData, ch + 1, nRet * sizeof(WCHAR) ); if (LCType != LOCALE_FONTSIGNATURE) lpLCData[nRet-1] = 0; } return nRet;
14 years, 2 months
1
0
0
0
[sir_richard] 48919: [NTOS]: Zeroed pages should go at the front, not the back of the zero list. Going to the back is a special boot-only case on MP, which isn't supported. Implement zero-only vers...
by sir_richard@svn.reactos.org
Author: sir_richard Date: Tue Sep 28 14:38:30 2010 New Revision: 48919 URL:
http://svn.reactos.org/svn/reactos?rev=48919&view=rev
Log: [NTOS]: Zeroed pages should go at the front, not the back of the zero list. Going to the back is a special boot-only case on MP, which isn't supported. Implement zero-only version of MiInsertPageInList, remove MiInsertZeroPageAtBack. [NTOS]: Remove many other deprecated functions. Physical memory consistency should now be higher than in the past. Modified: trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c trunk/reactos/ntoskrnl/mm/ARM3/miarm.h trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c trunk/reactos/ntoskrnl/mm/freelist.c trunk/reactos/ntoskrnl/mm/rmap.c trunk/reactos/ntoskrnl/mm/virtual.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c [iso-8859-1] Tue Sep 28 14:38:30 2010 @@ -444,10 +444,8 @@ return Base; } - // - // In user-mode, let ReactOS do it - // - return MiMapLockedPagesInUserSpace(Mdl, Base, CacheType, BaseAddress); + UNIMPLEMENTED; + return NULL; } /* @@ -557,10 +555,7 @@ } else { - // - // Let ReactOS handle it - // - MiUnmapLockedPagesInUserSpace(BaseAddress, Mdl); + UNIMPLEMENTED; } } Modified: trunk/reactos/ntoskrnl/mm/ARM3/miarm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/miarm.h?r…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/miarm.h [iso-8859-1] Tue Sep 28 14:38:30 2010 @@ -920,15 +920,9 @@ VOID NTAPI -MiInsertInListTail( +MiInsertPageInList( IN PMMPFNLIST ListHead, - IN PMMPFN Entry -); - -VOID -NTAPI -MiInsertZeroListAtBack( - IN PFN_NUMBER PageIndex + IN PFN_NUMBER PageFrameIndex ); VOID Modified: trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] Tue Sep 28 14:38:30 2010 @@ -69,137 +69,6 @@ ASSERT(VirtualAddress); KeZeroPages(VirtualAddress, PAGE_SIZE); MiUnmapPageInHyperSpace(Process, VirtualAddress, OldIrql); -} - -VOID -NTAPI -MiInsertInListTail(IN PMMPFNLIST ListHead, - IN PMMPFN Entry) -{ - PFN_NUMBER OldBlink, EntryIndex = MiGetPfnEntryIndex(Entry); - ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); - ASSERT_LIST_INVARIANT(ListHead); - - /* Get the back link */ - OldBlink = ListHead->Blink; - if (OldBlink != LIST_HEAD) - { - /* Set the back pointer to point to us now */ - MiGetPfnEntry(OldBlink)->u1.Flink = EntryIndex; - } - else - { - /* Set the list to point to us */ - ListHead->Flink = EntryIndex; - } - - /* Set the entry to point to the list head forwards, and the old page backwards */ - Entry->u1.Flink = LIST_HEAD; - Entry->u2.Blink = OldBlink; - - /* And now the head points back to us, since we are last */ - ListHead->Blink = EntryIndex; - ListHead->Total++; - ASSERT_LIST_INVARIANT(ListHead); -} - -VOID -NTAPI -MiInsertZeroListAtBack(IN PFN_NUMBER EntryIndex) -{ - PFN_NUMBER OldBlink; - PMMPFNLIST ListHead; - PMMPFN Pfn1; -#if 0 - PMMPFN Blink; - ULONG Color; - PMMCOLOR_TABLES ColorHead; -#endif - - /* Make sure the PFN lock is held */ - ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); - - /* Get the descriptor */ - Pfn1 = MiGetPfnEntry(EntryIndex); - ASSERT(Pfn1->u3.e2.ReferenceCount == 0); - ASSERT(Pfn1->u4.MustBeCached == 0); - ASSERT(Pfn1->u3.e1.Rom == 0); - ASSERT(Pfn1->u3.e1.RemovalRequested == 0); - ASSERT(Pfn1->u4.InPageError == 0); - - /* Use the zero list */ - ListHead = &MmZeroedPageListHead; - ASSERT_LIST_INVARIANT(ListHead); - ListHead->Total++; - - /* Get the back link */ - OldBlink = ListHead->Blink; - if (OldBlink != LIST_HEAD) - { - /* Set the back pointer to point to us now */ - MiGetPfnEntry(OldBlink)->u1.Flink = EntryIndex; - } - else - { - /* Set the list to point to us */ - ListHead->Flink = EntryIndex; - } - - /* Set the entry to point to the list head forwards, and the old page backwards */ - Pfn1->u1.Flink = LIST_HEAD; - Pfn1->u2.Blink = OldBlink; - - /* And now the head points back to us, since we are last */ - ListHead->Blink = EntryIndex; - ASSERT_LIST_INVARIANT(ListHead); - - /* Update the page location */ - Pfn1->u3.e1.PageLocation = ZeroedPageList; - - /* Update the available page count */ - MmAvailablePages++; - - /* Check if we've reached the configured low memory threshold */ - if (MmAvailablePages == MmLowMemoryThreshold) - { - /* Clear the event, because now we're ABOVE the threshold */ - KeClearEvent(MiLowMemoryEvent); - } - else if (MmAvailablePages == MmHighMemoryThreshold) - { - /* Otherwise check if we reached the high threshold and signal the event */ - KeSetEvent(MiHighMemoryEvent, 0, FALSE); - } - -#if 0 - /* Get the page color */ - Color = EntryIndex & MmSecondaryColorMask; - - /* Get the first page on the color list */ - ColorHead = &MmFreePagesByColor[ZeroedPageList][Color]; - if (ColorHead->Flink == LIST_HEAD) - { - /* The list is empty, so we are the first page */ - Pfn1->u4.PteFrame = -1; - ColorHead->Flink = EntryIndex; - } - else - { - /* Get the previous page */ - Blink = (PMMPFN)ColorHead->Blink; - - /* Make it link to us */ - Pfn1->u4.PteFrame = MiGetPfnEntryIndex(Blink); - Blink->OriginalPte.u.Long = EntryIndex; - } - - /* Now initialize our own list pointers */ - ColorHead->Blink = Pfn1; - Pfn1->OriginalPte.u.Long = LIST_HEAD; - - /* And increase the count in the colored list */ - ColorHead->Count++; -#endif } VOID @@ -527,45 +396,6 @@ /* Return the page */ return PageIndex; } - - -PMMPFN -NTAPI -MiRemoveHeadList(IN PMMPFNLIST ListHead) -{ - PFN_NUMBER Entry, Flink; - PMMPFN Pfn1; - ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); - ASSERT_LIST_INVARIANT(ListHead); - - /* Get the entry that's currently first on the list */ - Entry = ListHead->Flink; - Pfn1 = MiGetPfnEntry(Entry); - - /* Make the list point to the entry following the first one */ - Flink = Pfn1->u1.Flink; - ListHead->Flink = Flink; - - /* Check if the next entry is actually the list head */ - if (ListHead->Flink != LIST_HEAD) - { - /* It isn't, so therefore whoever is coming next points back to the head */ - MiGetPfnEntry(Flink)->u2.Blink = LIST_HEAD; - } - else - { - /* Then the list is empty, so the backlink should point back to us */ - ListHead->Blink = LIST_HEAD; - } - - /* We are not on a list anymore */ - Pfn1->u1.Flink = Pfn1->u2.Blink = 0; - ListHead->Total--; - ASSERT_LIST_INVARIANT(ListHead); - - /* Return the head element */ - return Pfn1; -} extern KEVENT ZeroPageThreadEvent; @@ -682,6 +512,82 @@ /* This is ReactOS-specific */ KeSetEvent(&ZeroPageThreadEvent, IO_NO_INCREMENT, FALSE); } +} + +/* Note: This function is hardcoded only for the zeroed page list, for now */ +VOID +NTAPI +MiInsertPageInList(IN PMMPFNLIST ListHead, + IN PFN_NUMBER PageFrameIndex) +{ + PFN_NUMBER Flink; + PMMPFN Pfn1, Pfn2; + MMLISTS ListName; + + /* For free pages, use MiInsertPageInFreeList */ + ASSERT(ListHead != &MmFreePageListHead); + + /* Make sure the lock is held */ + ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); + + /* Make sure the PFN is valid */ + ASSERT((PageFrameIndex) && + (PageFrameIndex <= MmHighestPhysicalPage) && + (PageFrameIndex >= MmLowestPhysicalPage)); + + /* Page should be unused */ + Pfn1 = MiGetPfnEntry(PageFrameIndex); + ASSERT(Pfn1->u3.e2.ReferenceCount == 0); + ASSERT(Pfn1->u3.e1.Rom != 1); + + /* Only used for zero pages in ReactOS */ + ListName = ListHead->ListName; + ASSERT(ListName == ZeroedPageList); + ListHead->Total++; + + /* Don't handle bad pages yet yet */ + ASSERT(Pfn1->u3.e1.RemovalRequested == 0); + + /* Make the head of the list point to this page now */ + Flink = ListHead->Flink; + ListHead->Flink = PageFrameIndex; + + /* Make the page point to the previous head, and back to the list */ + Pfn1->u1.Flink = Flink; + Pfn1->u2.Blink = LIST_HEAD; + + /* Was the list empty? */ + if (Flink != LIST_HEAD) + { + /* It wasn't, so update the backlink of the previous head page */ + Pfn2 = MiGetPfnEntry(Flink); + Pfn2->u2.Blink = PageFrameIndex; + } + else + { + /* It was empty, so have it loop back around to this new page */ + ListHead->Blink = PageFrameIndex; + } + + /* Move the page onto its new location */ + Pfn1->u3.e1.PageLocation = ListName; + + /* One more page on the system */ + MmAvailablePages++; + + /* Check if we've reached the configured low memory threshold */ + if (MmAvailablePages == MmLowMemoryThreshold) + { + /* Clear the event, because now we're ABOVE the threshold */ + KeClearEvent(MiLowMemoryEvent); + } + else if (MmAvailablePages == MmHighMemoryThreshold) + { + /* Otherwise check if we reached the high threshold and signal the event */ + KeSetEvent(MiHighMemoryEvent, 0, FALSE); + } + + /* FIXME: Color code handling */ } VOID 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 [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Tue Sep 28 14:38:30 2010 @@ -682,7 +682,7 @@ oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - MiInsertZeroListAtBack(PageIndex); + MiInsertPageInList(&MmZeroedPageListHead, PageIndex); Count++; } DPRINT("Zeroed %d pages.\n", Count); Modified: trunk/reactos/ntoskrnl/mm/rmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/rmap.c?rev=489…
============================================================================== --- trunk/reactos/ntoskrnl/mm/rmap.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/rmap.c [iso-8859-1] Tue Sep 28 14:38:30 2010 @@ -54,7 +54,7 @@ NTSTATUS NTAPI -MmWritePagePhysicalAddress(PFN_NUMBER Page) +MmPageOutPhysicalAddress(PFN_NUMBER Page) { PMM_RMAP_ENTRY entry; PMEMORY_AREA MemoryArea; @@ -66,140 +66,6 @@ ULONG Offset; NTSTATUS Status = STATUS_SUCCESS; - /* - * Check that the address still has a valid rmap; then reference the - * process so it isn't freed while we are working. - */ - ExAcquireFastMutex(&RmapListLock); - entry = MmGetRmapListHeadPage(Page); - if (entry == NULL) - { - ExReleaseFastMutex(&RmapListLock); - return(STATUS_UNSUCCESSFUL); - } - Process = entry->Process; - Address = entry->Address; - if ((((ULONG_PTR)Address) & 0xFFF) != 0) - { - KeBugCheck(MEMORY_MANAGEMENT); - } - if (Address < MmSystemRangeStart) - { - Status = ObReferenceObjectByPointer(Process, PROCESS_ALL_ACCESS, NULL, KernelMode); - ExReleaseFastMutex(&RmapListLock); - if (!NT_SUCCESS(Status)) - { - return Status; - } - AddressSpace = &Process->Vm; - } - else - { - ExReleaseFastMutex(&RmapListLock); - AddressSpace = MmGetKernelAddressSpace(); - } - - /* - * Lock the address space; then check that the address we are using - * still corresponds to a valid memory area (the page might have been - * freed or paged out after we read the rmap entry.) - */ - MmLockAddressSpace(AddressSpace); - MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, Address); - if (MemoryArea == NULL || MemoryArea->DeleteInProgress) - { - MmUnlockAddressSpace(AddressSpace); - if (Address < MmSystemRangeStart) - { - ObDereferenceObject(Process); - } - return(STATUS_UNSUCCESSFUL); - } - - Type = MemoryArea->Type; - if (Type == MEMORY_AREA_SECTION_VIEW) - { - Offset = (ULONG_PTR)Address - (ULONG_PTR)MemoryArea->StartingAddress - + MemoryArea->Data.SectionData.ViewOffset; - /* - * Get or create a pageop - */ - PageOp = MmGetPageOp(MemoryArea, NULL, 0, - MemoryArea->Data.SectionData.Segment, - Offset, MM_PAGEOP_PAGEOUT, TRUE); - - if (PageOp == NULL) - { - MmUnlockAddressSpace(AddressSpace); - if (Address < MmSystemRangeStart) - { - ObDereferenceObject(Process); - } - return(STATUS_UNSUCCESSFUL); - } - - /* - * Release locks now we have a page op. - */ - MmUnlockAddressSpace(AddressSpace); - - /* - * Do the actual page out work. - */ - Status = MmWritePageSectionView(AddressSpace, MemoryArea, - Address, PageOp); - } - else if (Type == MEMORY_AREA_VIRTUAL_MEMORY) - { - PageOp = MmGetPageOp(MemoryArea, Address < MmSystemRangeStart ? Process->UniqueProcessId : NULL, - Address, NULL, 0, MM_PAGEOP_PAGEOUT, TRUE); - - if (PageOp == NULL) - { - MmUnlockAddressSpace(AddressSpace); - if (Address < MmSystemRangeStart) - { - ObDereferenceObject(Process); - } - return(STATUS_UNSUCCESSFUL); - } - - /* - * Release locks now we have a page op. - */ - MmUnlockAddressSpace(AddressSpace); - - /* - * Do the actual page out work. - */ - Status = MmWritePageVirtualMemory(AddressSpace, MemoryArea, - Address, PageOp); - } - else - { - KeBugCheck(MEMORY_MANAGEMENT); - } - if (Address < MmSystemRangeStart) - { - ObDereferenceObject(Process); - } - return(Status); -} - -NTSTATUS -NTAPI -MmPageOutPhysicalAddress(PFN_NUMBER Page) -{ - PMM_RMAP_ENTRY entry; - PMEMORY_AREA MemoryArea; - PMMSUPPORT AddressSpace; - ULONG Type; - PVOID Address; - PEPROCESS Process; - PMM_PAGEOP PageOp; - ULONG Offset; - NTSTATUS Status = STATUS_SUCCESS; - ExAcquireFastMutex(&RmapListLock); entry = MmGetRmapListHeadPage(Page); if (entry == NULL) Modified: trunk/reactos/ntoskrnl/mm/virtual.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/virtual.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/virtual.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/virtual.c [iso-8859-1] Tue Sep 28 14:38:30 2010 @@ -160,115 +160,6 @@ MmUnlockAddressSpace(AddressSpace); return Status; -} - -PVOID -NTAPI -MiMapLockedPagesInUserSpace(IN PMDL Mdl, - IN PVOID BaseVa, - IN MEMORY_CACHING_TYPE CacheType, - IN PVOID BaseAddress) -{ - PVOID Base; - PPFN_NUMBER MdlPages; - ULONG PageCount; - PEPROCESS CurrentProcess; - NTSTATUS Status; - ULONG Protect; - MEMORY_AREA *Result; - LARGE_INTEGER BoundaryAddressMultiple; - - /* Calculate the number of pages required. */ - MdlPages = (PPFN_NUMBER)(Mdl + 1); - PageCount = PAGE_ROUND_UP(Mdl->ByteCount + Mdl->ByteOffset) / PAGE_SIZE; - - /* Set default page protection */ - Protect = PAGE_READWRITE; - if (CacheType == MmNonCached) Protect |= PAGE_NOCACHE; - - BoundaryAddressMultiple.QuadPart = 0; - Base = BaseAddress; - - CurrentProcess = PsGetCurrentProcess(); - - MmLockAddressSpace(&CurrentProcess->Vm); - Status = MmCreateMemoryArea(&CurrentProcess->Vm, - MEMORY_AREA_MDL_MAPPING, - &Base, - PageCount * PAGE_SIZE, - Protect, - &Result, - (Base != NULL), - 0, - BoundaryAddressMultiple); - MmUnlockAddressSpace(&CurrentProcess->Vm); - if (!NT_SUCCESS(Status)) - { - if (Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL) - { - return NULL; - } - - /* Throw exception */ - ExRaiseStatus(STATUS_ACCESS_VIOLATION); - ASSERT(0); - } - - /* Set the virtual mappings for the MDL pages. */ - if (Mdl->MdlFlags & MDL_IO_SPACE) - { - /* Map the pages */ - Status = MmCreateVirtualMappingUnsafe(CurrentProcess, - Base, - Protect, - MdlPages, - PageCount); - } - else - { - /* Map the pages */ - Status = MmCreateVirtualMapping(CurrentProcess, - Base, - Protect, - MdlPages, - PageCount); - } - - /* Check if the mapping suceeded */ - if (!NT_SUCCESS(Status)) - { - /* If it can fail, return NULL */ - if (Mdl->MdlFlags & MDL_MAPPING_CAN_FAIL) return NULL; - - /* Throw exception */ - ExRaiseStatus(STATUS_ACCESS_VIOLATION); - } - - /* Return the base */ - Base = (PVOID)((ULONG_PTR)Base + Mdl->ByteOffset); - return Base; -} - -VOID -NTAPI -MiUnmapLockedPagesInUserSpace(IN PVOID BaseAddress, - IN PMDL Mdl) -{ - PMEMORY_AREA MemoryArea; - - /* Sanity check */ - ASSERT(Mdl->Process == PsGetCurrentProcess()); - - /* Find the memory area */ - MemoryArea = MmLocateMemoryAreaByAddress(&Mdl->Process->Vm, - BaseAddress); - ASSERT(MemoryArea); - - /* Free it */ - MmFreeMemoryArea(&Mdl->Process->Vm, - MemoryArea, - NULL, - NULL); } /* SYSTEM CALLS ***************************************************************/
14 years, 2 months
1
0
0
0
[sir_richard] 48918: [NTOS]: One last fix to the zero page thread before we move to ARM3: use MiRemoveAnyPage instead of dangerous MiRemoveHeadList. The code works on the assumption (validated by W...
by sir_richard@svn.reactos.org
Author: sir_richard Date: Tue Sep 28 14:29:37 2010 New Revision: 48918 URL:
http://svn.reactos.org/svn/reactos?rev=48918&view=rev
Log: [NTOS]: One last fix to the zero page thread before we move to ARM3: use MiRemoveAnyPage instead of dangerous MiRemoveHeadList. The code works on the assumption (validated by Windows through a bug check) that MiRemoveAnyPage always returns the first free page, and we also manually grab the first free page, and compare this is true. Nice way to detect PFN database corruption. [NTOS]: Fix MiInsertZeroAtBack to increment the MmAvailablePage count, since MiRemoveAnyPage decrements it (MiRemoveHeadList did not). Modified: trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c trunk/reactos/ntoskrnl/mm/freelist.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] Tue Sep 28 14:29:37 2010 @@ -156,8 +156,8 @@ /* Update the page location */ Pfn1->u3.e1.PageLocation = ZeroedPageList; - /* FIXME: NOT YET Due to caller semantics: Update the available page count */ - //MmAvailablePages++; + /* Update the available page count */ + MmAvailablePages++; /* Check if we've reached the configured low memory threshold */ if (MmAvailablePages == MmLowMemoryThreshold) 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 [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Tue Sep 28 14:29:37 2010 @@ -631,8 +631,8 @@ { NTSTATUS Status; KIRQL oldIrql; - PPHYSICAL_PAGE PageDescriptor; - PFN_NUMBER Pfn; + PMMPFN Pfn1; + PFN_NUMBER PageIndex, FreePage; ULONG Count; PVOID ZeroAddress; @@ -660,21 +660,30 @@ oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); while (MmFreePageListHead.Total) { - PageDescriptor = MiRemoveHeadList(&MmFreePageListHead); - Pfn = MiGetPfnEntryIndex(PageDescriptor); - KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql); - - PageDescriptor->u1.Flink = LIST_HEAD; - ZeroAddress = MiMapPagesToZeroInHyperSpace(PageDescriptor, 1); - ASSERT(ZeroAddress); - RtlZeroMemory(ZeroAddress, PAGE_SIZE); - MiUnmapPagesInZeroSpace(ZeroAddress, 1); - - oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - - MiInsertZeroListAtBack(Pfn); - Count++; - + PageIndex = MmFreePageListHead.Flink; + Pfn1 = MiGetPfnEntry(PageIndex); + FreePage = MiRemoveAnyPage(0); // FIXME: Use real color + if (FreePage != PageIndex) + { + KeBugCheckEx(PFN_LIST_CORRUPT, + 0x8F, + FreePage, + PageIndex, + 0); + } + + Pfn1->u1.Flink = LIST_HEAD; + KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql); + + ZeroAddress = MiMapPagesToZeroInHyperSpace(Pfn1, 1); + ASSERT(ZeroAddress); + RtlZeroMemory(ZeroAddress, PAGE_SIZE); + MiUnmapPagesInZeroSpace(ZeroAddress, 1); + + oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); + + MiInsertZeroListAtBack(PageIndex); + Count++; } DPRINT("Zeroed %d pages.\n", Count); KeResetEvent(&ZeroPageThreadEvent);
14 years, 2 months
1
0
0
0
[fireball] 48917: [KERNEL32] - Igor Paliychuk: Fix properly showing genitive names from NLS data by applying a missed Wine sync. See issue #5556 for more details.
by fireball@svn.reactos.org
Author: fireball Date: Tue Sep 28 14:24:17 2010 New Revision: 48917 URL:
http://svn.reactos.org/svn/reactos?rev=48917&view=rev
Log: [KERNEL32] - Igor Paliychuk: Fix properly showing genitive names from NLS data by applying a missed Wine sync. See issue #5556 for more details. Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/la…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] Tue Sep 28 14:24:17 2010 @@ -1761,7 +1761,7 @@ } else { - memcpy( lpLCData, ch + 1, *ch * sizeof(WCHAR) ); + memcpy( lpLCData, ch + 1, nRet * sizeof(WCHAR) ); if (LCType != LOCALE_FONTSIGNATURE) lpLCData[nRet-1] = 0; } return nRet;
14 years, 2 months
1
0
0
0
[akhaldi] 48916: [CMAKE] - Add csrss, csrsrv and win32csr to build. By Alexey Komarov (IRC: q4a)
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 28 13:41:23 2010 New Revision: 48916 URL:
http://svn.reactos.org/svn/reactos?rev=48916&view=rev
Log: [CMAKE] - Add csrss, csrsrv and win32csr to build. By Alexey Komarov (IRC: q4a) Added: branches/cmake-bringup/importlibs/libcsrsrv.a (with props) branches/cmake-bringup/importlibs/libsmdll.a (with props) branches/cmake-bringup/subsystems/win32/csrss/CMakeLists.txt (with props) branches/cmake-bringup/subsystems/win32/csrss/csrsrv/CMakeLists.txt (with props) branches/cmake-bringup/subsystems/win32/csrss/win32csr/CMakeLists.txt (with props) Modified: branches/cmake-bringup/subsystems/win32/CMakeLists.txt Added: branches/cmake-bringup/importlibs/libcsrsrv.a URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/importlibs/libcsr…
============================================================================== Binary file - no diff available. Propchange: branches/cmake-bringup/importlibs/libcsrsrv.a ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: branches/cmake-bringup/importlibs/libsmdll.a URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/importlibs/libsmd…
============================================================================== Binary file - no diff available. Propchange: branches/cmake-bringup/importlibs/libsmdll.a ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: branches/cmake-bringup/subsystems/win32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
============================================================================== --- branches/cmake-bringup/subsystems/win32/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/subsystems/win32/CMakeLists.txt [iso-8859-1] Tue Sep 28 13:41:23 2010 @@ -1,2 +1,3 @@ +add_subdirectory(csrss) add_subdirectory(win32k) Added: branches/cmake-bringup/subsystems/win32/csrss/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
============================================================================== --- branches/cmake-bringup/subsystems/win32/csrss/CMakeLists.txt (added) +++ branches/cmake-bringup/subsystems/win32/csrss/CMakeLists.txt [iso-8859-1] Tue Sep 28 13:41:23 2010 @@ -1,0 +1,17 @@ + +include_directories(include) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/drivers) + +add_executable(csrss csrss.c csrss.rc) + +set_module_type(csrss nativecui) + +target_link_libraries(csrss nt) + +add_importlibs(csrss ntdll csrsrv) + +add_dependencies(csrss psdk bugcodes) + +add_subdirectory(csrsrv) +add_subdirectory(win32csr) Propchange: branches/cmake-bringup/subsystems/win32/csrss/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/cmake-bringup/subsystems/win32/csrss/csrsrv/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
============================================================================== --- branches/cmake-bringup/subsystems/win32/csrss/csrsrv/CMakeLists.txt (added) +++ branches/cmake-bringup/subsystems/win32/csrss/csrsrv/CMakeLists.txt [iso-8859-1] Tue Sep 28 13:41:23 2010 @@ -1,0 +1,27 @@ + +include_directories(${REACTOS_SOURCE_DIR}/subsystems/win32/csrss/include) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) + +spec2def(csrsrv ${CMAKE_CURRENT_SOURCE_DIR}/csrsrv.spec ${CMAKE_CURRENT_BINARY_DIR}/csrsrv.def) + +list(APPEND SOURCE + api/process.c + api/user.c + api/wapi.c + procsup.c + thredsup.c + init.c) + +add_library(csrsrv SHARED ${CMAKE_CURRENT_BINARY_DIR}/csrsrv_srv.h.gch ${SOURCE}) + +target_link_libraries(csrsrv + ${CMAKE_CURRENT_BINARY_DIR}/csrsrv.def + pseh) + +set_module_type(csrsrv nativedll) + +add_importlibs(csrsrv ntdll smdll) + +add_pch(csrsrv ${CMAKE_CURRENT_SOURCE_DIR}/srv.h ${SOURCE}) + +add_dependencies(csrsrv csrsrv_def psdk bugcodes) Propchange: branches/cmake-bringup/subsystems/win32/csrss/csrsrv/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/cmake-bringup/subsystems/win32/csrss/win32csr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
============================================================================== --- branches/cmake-bringup/subsystems/win32/csrss/win32csr/CMakeLists.txt (added) +++ branches/cmake-bringup/subsystems/win32/csrss/win32csr/CMakeLists.txt [iso-8859-1] Tue Sep 28 13:41:23 2010 @@ -1,0 +1,41 @@ + +include_directories(BEFORE .) +include_directories(${REACTOS_SOURCE_DIR}/subsystems/win32/csrss/include) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/drivers) +include_directories(${REACTOS_SOURCE_DIR}/dll/cpl/console) + +spec2def(win32csr ${CMAKE_CURRENT_SOURCE_DIR}/win32csr.spec ${CMAKE_CURRENT_BINARY_DIR}/win32csr.def) + +set_rc_compiler() + +list(APPEND SOURCE + alias.c + appswitch.c + coninput.c + conoutput.c + console.c + desktopbg.c + dllmain.c + exitros.c + guiconsole.c + handle.c + harderror.c + lineinput.c + tuiconsole.c + win32csr.rc) + +add_library(win32csr SHARED ${CMAKE_CURRENT_BINARY_DIR}/win32csr_w32csr.h.gch ${SOURCE}) + +target_link_libraries(win32csr + ${CMAKE_CURRENT_BINARY_DIR}/win32csr.def + win32ksys + pseh) + +set_module_type(win32csr win32dll) + +add_importlibs(win32csr ntdll user32 gdi32 advapi32 psapi) + +add_pch(win32csr ${CMAKE_CURRENT_SOURCE_DIR}/w32csr.h ${SOURCE}) + +add_dependencies(win32csr win32csr_def psdk bugcodes) Propchange: branches/cmake-bringup/subsystems/win32/csrss/win32csr/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native
14 years, 2 months
1
0
0
0
[akhaldi] 48915: [USETUP] - Update Ukrainian translation by Igor Paliychuk. See issue #5536 5540 5604 5614 5617 for more details.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 28 13:39:57 2010 New Revision: 48915 URL:
http://svn.reactos.org/svn/reactos?rev=48915&view=rev
Log: [USETUP] - Update Ukrainian translation by Igor Paliychuk. See issue #5536 5540 5604 5614 5617 for more details. Modified: trunk/reactos/base/setup/usetup/lang/uk-UA.h Modified: trunk/reactos/base/setup/usetup/lang/uk-UA.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/uk-…
============================================================================== --- trunk/reactos/base/setup/usetup/lang/uk-UA.h [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/lang/uk-UA.h [iso-8859-1] Tue Sep 28 13:39:57 2010 @@ -985,31 +985,31 @@ { 6, 8, - "áâ ®¢«î¢ ç ¢áâ ®¢«îó boot loader", + "áâ ®¢«î¢ ç ¢áâ ®¢«îó § ¢ ⠦㢠ç", TEXT_STYLE_NORMAL }, { 8, 12, - "áâ ®¢¨â¨ § ¢ â ¦ã¢ ç ¦®àá⪨© ¤¨áª (MBR i VBR).", + "áâ ®¢¨â¨ § ¢ â ¦ã¢ ç ¦®àá⪨© ¤¨áª (MBR i VBR).", TEXT_STYLE_NORMAL }, { 8, 13, - "áâ ®¢¨â¨ § ¢ â ¦ã¢ ç ¦®àá⪨© ¤¨áª («¨è¥ VBR).", + "áâ ®¢¨â¨ § ¢ â ¦ã¢ ç ¦®àá⪨© ¤¨áª («¨è¥ VBR).", TEXT_STYLE_NORMAL }, { 8, 14, - "áâ ®¢¨â¨ § ¢ â ¦ã¢ ç ¤¨áª¥âã.", + "áâ ®¢¨â¨ § ¢ â ¦ã¢ ç ¤¨áª¥âã.", TEXT_STYLE_NORMAL }, { 8, 15, - "¥ ¢áâ ®¢«î¢ ⨠§ ¢ ⠦㢠ç.", + "¥ ¢áâ ®¢«î¢ ⨠§ ¢ ⠦㢠ç.", TEXT_STYLE_NORMAL }, {
14 years, 2 months
1
0
0
0
[akhaldi] 48914: [CMAKE] - Add typelib support macro and use it with stdole2. By Jerome Gardou.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 28 13:32:41 2010 New Revision: 48914 URL:
http://svn.reactos.org/svn/reactos?rev=48914&view=rev
Log: [CMAKE] - Add typelib support macro and use it with stdole2. By Jerome Gardou. Modified: branches/cmake-bringup/gcc.cmake branches/cmake-bringup/include/psdk/CMakeLists.txt branches/cmake-bringup/include/psdk/stdole2.idl branches/cmake-bringup/msc.cmake Modified: branches/cmake-bringup/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=489…
============================================================================== --- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Tue Sep 28 13:32:41 2010 @@ -108,3 +108,18 @@ SET(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${result_defs} ${result_incs} -i <SOURCE> -O coff -o <OBJECT>") endmacro() + +#typelib support +macro(ADD_TYPELIB TARGET) + FOREACH(SOURCE ${ARGN}) + GET_FILENAME_COMPONENT(FILE ${SOURCE} NAME_WE) + SET(OBJECT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}.tlb) + ADD_CUSTOM_COMMAND( + OUTPUT ${OBJECT} + COMMAND native-widl -I${REACTOS_SOURCE_DIR}/include/dxsdk -I. -I${REACTOS_SOURCE_DIR}/include -I${REACTOS_SOURCE_DIR}/include/psdk -m32 --win32 -t -T ${OBJECT} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE} + DEPENDS native-widl + ) + LIST(APPEND OBJECTS ${OBJECT}) + ENDFOREACH() + ADD_CUSTOM_TARGET(${TARGET} ALL DEPENDS ${OBJECTS}) +ENDMACRO() Modified: branches/cmake-bringup/include/psdk/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/psdk/CMak…
============================================================================== --- branches/cmake-bringup/include/psdk/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/include/psdk/CMakeLists.txt [iso-8859-1] Tue Sep 28 13:32:41 2010 @@ -109,12 +109,4 @@ ADD_INTERFACE_DEFINITIONS(psdk ${SOURCE}) -ADD_CUSTOM_COMMAND( - OUTPUT ${REACTOS_BINARY_DIR}/include/psdk/stdole2.tlb - COMMAND native-widl -I${REACTOS_SOURCE_DIR}/include/dxsdk -I. -I${REACTOS_SOURCE_DIR}/include -I${REACTOS_SOURCE_DIR}/include/psdk -m32 --win32 -t -T ${REACTOS_BINARY_DIR}/include/psdk/stdole2.tlb ${REACTOS_SOURCE_DIR}/include/psdk/stdole2.idl - DEPENDS native-widl -) - -SET_SOURCE_FILES_PROPERTIES(${REACTOS_BINARY_DIR}/include/psdk/stdole2.tlb PROPERTIES GENERATED TRUE) - -ADD_CUSTOM_TARGET(stdole2 ALL DEPENDS ${REACTOS_BINARY_DIR}/include/psdk/stdole2.tlb) +ADD_TYPELIB(stdole2 stdole2.idl) Modified: branches/cmake-bringup/include/psdk/stdole2.idl URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/psdk/stdo…
============================================================================== --- branches/cmake-bringup/include/psdk/stdole2.idl [iso-8859-1] (original) +++ branches/cmake-bringup/include/psdk/stdole2.idl [iso-8859-1] Tue Sep 28 13:32:41 2010 @@ -61,7 +61,7 @@ void *pfnDeferredFillIn; SCODE scode; } EXCEPINFO; - +#ifndef __midl [ odl, uuid(00000000-0000-0000-C000-000000000046), @@ -139,7 +139,7 @@ HRESULT Clone( [out] IEnumVARIANT **ppenum); } - +#endif /* !__midl */ typedef [uuid(66504301-BE0F-101A-8BBB-00AA00300CAB), public] unsigned long OLE_COLOR; Modified: branches/cmake-bringup/msc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/msc.cmake?rev=489…
============================================================================== --- branches/cmake-bringup/msc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/msc.cmake [iso-8859-1] Tue Sep 28 13:32:41 2010 @@ -64,4 +64,18 @@ macro(set_rc_compiler) # dummy, this workaround is only needed in mingw due to lack of RC support in cmake -endmacro() +endmacro() + +#typelib support +macro(ADD_TYPELIB TARGET) + FOREACH(SOURCE ${ARGN}) + GET_FILENAME_COMPONENT(FILE ${SOURCE} NAME_WE) + SET(OBJECT ${CMAKE_CURRENT_BINARY_DIR}/${FILE}.tlb) + ADD_CUSTOM_COMMAND( + OUTPUT ${OBJECT} + COMMAND midl /I ${REACTOS_SOURCE_DIR}/include/dxsdk /I . /I ${REACTOS_SOURCE_DIR}/include /I ${REACTOS_SOURCE_DIR}/include/psdk /win32 /tlb ${OBJECT} ${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE} + ) + LIST(APPEND OBJECTS ${OBJECT}) + ENDFOREACH() + ADD_CUSTOM_TARGET(${TARGET} ALL DEPENDS ${OBJECTS}) +ENDMACRO()
14 years, 2 months
1
0
0
0
[khornicek] 48913: [KERNEL32] Winnls.h can be included now.
by khornicek@svn.reactos.org
Author: khornicek Date: Tue Sep 28 00:02:05 2010 New Revision: 48913 URL:
http://svn.reactos.org/svn/reactos?rev=48913&view=rev
Log: [KERNEL32] Winnls.h can be included now. Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c Modified: trunk/reactos/dll/win32/kernel32/misc/lang.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/misc/la…
============================================================================== --- trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/kernel32/misc/lang.c [iso-8859-1] Tue Sep 28 00:02:05 2010 @@ -17,17 +17,13 @@ */ #include <k32.h> +#include <winnls.h> #define NDEBUG #include <debug.h> #include "lcformat_private.h" -/* FIXME: these are included in winnls.h, however including this file causes alot of - conflicting type errors. */ - -#define LOCALE_RETURN_NUMBER 0x20000000 -#define LOCALE_USE_CP_ACP 0x40000000 #define LOCALE_LOCALEINFOFLAGSMASK (LOCALE_NOUSEROVERRIDE|LOCALE_USE_CP_ACP|\ LOCALE_RETURN_NUMBER|LOCALE_RETURN_GENITIVE_NAMES) #define CALINFO_MAX_YEAR 2029
14 years, 2 months
1
0
0
0
[sir_richard] 48912: - Remove MiZeroPage, use MiZeroPhysicalPage instead. They work pretty much the same except the needless raise to DISPATCH_LEVEL. - Get rid of the messed up MiMapPageToZeroInHyp...
by sir_richard@svn.reactos.org
Author: sir_richard Date: Mon Sep 27 21:58:54 2010 New Revision: 48912 URL:
http://svn.reactos.org/svn/reactos?rev=48912&view=rev
Log: - Remove MiZeroPage, use MiZeroPhysicalPage instead. They work pretty much the same except the needless raise to DISPATCH_LEVEL. - Get rid of the messed up MiMapPageToZeroInHyperSpace which was hacking into MiMapPagesToZeroInHyperSpace. Now MiMapPagesToZeroInHyperSpace is properly implemented to use chained PFNs, and the MmZeroPageThread code has been modified to correctly use the new mechanism. - Zero page mapping now happens at PASSIVE trough MiMapPAgesToZeroInHyperSpace, not DISPATCH anymore. - More fixes are coming to remove the remaining MiRemoveHeadList and rewrite the zero page loop. Should fix more possible corruptions. Modified: trunk/reactos/ntoskrnl/cc/copy.c trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/mm/ARM3/hypermap.c trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c trunk/reactos/ntoskrnl/mm/balance.c trunk/reactos/ntoskrnl/mm/freelist.c Modified: trunk/reactos/ntoskrnl/cc/copy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/copy.c?rev=489…
============================================================================== --- trunk/reactos/ntoskrnl/cc/copy.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/cc/copy.c [iso-8859-1] Mon Sep 27 21:58:54 2010 @@ -31,6 +31,12 @@ VOID NTAPI +MiZeroPhysicalPage( + IN PFN_NUMBER PageFrameIndex +); + +VOID +NTAPI CcInitCacheZeroPage(VOID) { NTSTATUS Status; @@ -41,12 +47,7 @@ DbgPrint("Can't allocate CcZeroPage.\n"); KeBugCheck(CACHE_MANAGER); } - Status = MiZeroPage(CcZeroPage); - if (!NT_SUCCESS(Status)) - { - DbgPrint("Can't zero out CcZeroPage.\n"); - KeBugCheck(CACHE_MANAGER); - } + MiZeroPhysicalPage(CcZeroPage); } NTSTATUS Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Mon Sep 27 21:58:54 2010 @@ -1189,7 +1189,7 @@ PVOID NTAPI -MiMapPagesToZeroInHyperSpace(IN PMMPFN *Pages, +MiMapPagesToZeroInHyperSpace(IN PMMPFN Pfn1, IN PFN_NUMBER NumberOfPages); VOID @@ -1206,14 +1206,6 @@ { HyperProcess = (PEPROCESS)KeGetCurrentThread()->ApcState.Process; return MiMapPageInHyperSpace(HyperProcess, Page, &HyperIrql); -} - -FORCEINLINE -PVOID -MiMapPageToZeroInHyperSpace(IN PFN_NUMBER Page) -{ - PMMPFN Pfn1 = MiGetPfnEntry(Page); - return MiMapPagesToZeroInHyperSpace(&Pfn1, 1); } #define MmDeleteHyperspaceMapping(x) MiUnmapPageInHyperSpace(HyperProcess, x, HyperIrql); Modified: trunk/reactos/ntoskrnl/mm/ARM3/hypermap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/hypermap.…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/hypermap.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/hypermap.c [iso-8859-1] Mon Sep 27 21:58:54 2010 @@ -112,18 +112,17 @@ PVOID NTAPI -MiMapPagesToZeroInHyperSpace(IN PMMPFN *Pages, +MiMapPagesToZeroInHyperSpace(IN PMMPFN Pfn1, IN PFN_NUMBER NumberOfPages) { MMPTE TempPte; PMMPTE PointerPte; PFN_NUMBER Offset, PageFrameIndex; - PMMPFN Page; // // Sanity checks // - ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); + ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL); ASSERT(NumberOfPages != 0); ASSERT(NumberOfPages <= (MI_ZERO_PTES - 1)); @@ -151,19 +150,17 @@ // PointerPte->u.Hard.PageFrameNumber = Offset - NumberOfPages; - // - // Write the current PTE - // + /* Choose the correct PTE to use, and which template */ PointerPte += (Offset + 1); TempPte = ValidKernelPte; MI_MAKE_LOCAL_PAGE(&TempPte); // Hyperspace is local! - do + + /* Make sure the list isn't empty and loop it */ + ASSERT(Pfn1 != (PVOID)LIST_HEAD); + while (Pfn1 != (PVOID)LIST_HEAD) { - // - // Get the first page entry and its PFN - // - Page = *Pages++; - PageFrameIndex = MiGetPfnEntryIndex(Page); + /* Get the page index for this PFN */ + PageFrameIndex = MiGetPfnEntryIndex(Pfn1); // // Write the PFN @@ -175,7 +172,10 @@ // PointerPte--; MI_WRITE_VALID_PTE(PointerPte, TempPte); - } while (--NumberOfPages); + + /* Move to the next PFN */ + Pfn1 = (PMMPFN)Pfn1->u1.Flink; + } // // Return the address @@ -193,7 +193,7 @@ // // Sanity checks // - ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL); + ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL); ASSERT (NumberOfPages != 0); ASSERT (NumberOfPages <= (MI_ZERO_PTES - 1)); Modified: trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/pfnlist.c [iso-8859-1] Mon Sep 27 21:58:54 2010 @@ -66,6 +66,7 @@ /* Map in hyperspace, then wipe it using XMMI or MEMSET */ VirtualAddress = MiMapPageInHyperSpace(Process, PageFrameIndex, &OldIrql); + ASSERT(VirtualAddress); KeZeroPages(VirtualAddress, PAGE_SIZE); MiUnmapPageInHyperSpace(Process, VirtualAddress, OldIrql); } 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 [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/balance.c [iso-8859-1] Mon Sep 27 21:58:54 2010 @@ -99,6 +99,12 @@ MiMemoryConsumers[Consumer].Trim = Trim; } +VOID +NTAPI +MiZeroPhysicalPage( + IN PFN_NUMBER PageFrameIndex +); + NTSTATUS NTAPI MmReleasePageMemoryConsumer(ULONG Consumer, PFN_NUMBER Page) @@ -131,7 +137,7 @@ Request = CONTAINING_RECORD(Entry, MM_ALLOCATION_REQUEST, ListEntry); KeReleaseSpinLock(&AllocationListLock, OldIrql); if(Consumer == MC_USER) MmRemoveLRUUserPage(Page); - MiZeroPage(Page); + MiZeroPhysicalPage(Page); Request->Page = Page; KeSetEvent(&Request->Event, IO_NO_INCREMENT, FALSE); } 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 [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Mon Sep 27 21:58:54 2010 @@ -360,7 +360,7 @@ // Pfn1 = MiGetPfnEntry(Page); ASSERT(Pfn1); - if (Pfn1->u3.e1.PageLocation != ZeroedPageList) MiZeroPage(Page); + if (Pfn1->u3.e1.PageLocation != ZeroedPageList) MiZeroPhysicalPage(Page); Pfn1->u3.e1.PageLocation = ActiveAndValid; } @@ -627,25 +627,6 @@ NTSTATUS NTAPI -MiZeroPage(PFN_NUMBER Page) -{ - KIRQL Irql; - PVOID TempAddress; - - Irql = KeRaiseIrqlToDpcLevel(); - TempAddress = MiMapPageToZeroInHyperSpace(Page); - if (TempAddress == NULL) - { - return(STATUS_NO_MEMORY); - } - memset(TempAddress, 0, PAGE_SIZE); - MiUnmapPagesInZeroSpace(TempAddress, 1); - KeLowerIrql(Irql); - return(STATUS_SUCCESS); -} - -NTSTATUS -NTAPI MmZeroPageThreadMain(PVOID Ignored) { NTSTATUS Status; @@ -653,6 +634,7 @@ PPHYSICAL_PAGE PageDescriptor; PFN_NUMBER Pfn; ULONG Count; + PVOID ZeroAddress; /* Free initial kernel memory */ //MiFreeInitMemory(); @@ -679,22 +661,19 @@ while (MmFreePageListHead.Total) { PageDescriptor = MiRemoveHeadList(&MmFreePageListHead); - /* We set the page to used, because MmCreateVirtualMapping failed with unused pages */ + Pfn = MiGetPfnEntryIndex(PageDescriptor); KeReleaseQueuedSpinLock(LockQueuePfnLock, oldIrql); - Pfn = MiGetPfnEntryIndex(PageDescriptor); - Status = MiZeroPage(Pfn); + + PageDescriptor->u1.Flink = LIST_HEAD; + ZeroAddress = MiMapPagesToZeroInHyperSpace(PageDescriptor, 1); + ASSERT(ZeroAddress); + RtlZeroMemory(ZeroAddress, PAGE_SIZE); + MiUnmapPagesInZeroSpace(ZeroAddress, 1); oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - if (NT_SUCCESS(Status)) - { - MiInsertZeroListAtBack(Pfn); - Count++; - } - else - { - MiInsertInListTail(&MmFreePageListHead, PageDescriptor); - PageDescriptor->u3.e1.PageLocation = FreePageList; - } + + MiInsertZeroListAtBack(Pfn); + Count++; } DPRINT("Zeroed %d pages.\n", Count);
14 years, 2 months
1
0
0
0
[khornicek] 48911: Fixes for bugs: 5591, 5482, 5517, 5472, 5554 and 5567 These issues are either already fixed in the yarotows branch or will be solved with next sync of corresponding libs. Merging...
by khornicek@svn.reactos.org
Author: khornicek Date: Mon Sep 27 21:12:09 2010 New Revision: 48911 URL:
http://svn.reactos.org/svn/reactos?rev=48911&view=rev
Log: Fixes for bugs: 5591, 5482, 5517, 5472, 5554 and 5567 These issues are either already fixed in the yarotows branch or will be solved with next sync of corresponding libs. Merging or doing full syncs before release could cause more troubles so I hope these (hack)fixes are justified. Modified: branches/ros-branch-0_3_12/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesa.c branches/ros-branch-0_3_12/reactos/dll/3rdparty/mesa32/src/main/getstring.c branches/ros-branch-0_3_12/reactos/dll/win32/comctl32/propsheet.c branches/ros-branch-0_3_12/reactos/dll/win32/comctl32/treeview.c branches/ros-branch-0_3_12/reactos/dll/win32/user32/windows/cursoricon.c branches/ros-branch-0_3_12/reactos/subsystems/win32/win32k/objects/device.c Modified: branches/ros-branch-0_3_12/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesa.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_12/reactos/dll/3…
============================================================================== --- branches/ros-branch-0_3_12/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesa.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_12/reactos/dll/3rdparty/mesa32/src/drivers/windows/gdi/wmesa.c [iso-8859-1] Mon Sep 27 21:12:09 2010 @@ -119,6 +119,7 @@ /* Only 16 and 32 bit targets are supported now */ assert(pwfb->cColorBits == 0 || + pwfb->cColorBits == 8 || pwfb->cColorBits == 16 || pwfb->cColorBits == 24 || pwfb->cColorBits == 32); Modified: branches/ros-branch-0_3_12/reactos/dll/3rdparty/mesa32/src/main/getstring.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_12/reactos/dll/3…
============================================================================== --- branches/ros-branch-0_3_12/reactos/dll/3rdparty/mesa32/src/main/getstring.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_12/reactos/dll/3rdparty/mesa32/src/main/getstring.c [iso-8859-1] Mon Sep 27 21:12:09 2010 @@ -126,7 +126,7 @@ _mesa_GetString( GLenum name ) { GET_CURRENT_CONTEXT(ctx); - static const char *vendor = "Brian Paul"; + static const char *vendor = "Mesa"; static const char *renderer = "Mesa"; if (!ctx) Modified: branches/ros-branch-0_3_12/reactos/dll/win32/comctl32/propsheet.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_12/reactos/dll/w…
============================================================================== --- branches/ros-branch-0_3_12/reactos/dll/win32/comctl32/propsheet.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_12/reactos/dll/win32/comctl32/propsheet.c [iso-8859-1] Mon Sep 27 21:12:09 2010 @@ -2421,6 +2421,27 @@ return FALSE; } +#ifndef DISABLE_USER32_HACKS +BOOL CALLBACK +EnumChildProc(HWND hwnd, LPARAM lParam) +{ + WCHAR szType[20]; + + RealGetWindowClassW(hwnd, szType, 20); + + if (strcmpW(szType, WC_EDITW) == 0) + { + if (IsWindowEnabled(hwnd) && IsWindowVisible(hwnd)) + { + *(PLONG)lParam = TRUE; + return FALSE; + } + } + + return TRUE; +} +#endif + /****************************************************************************** * PROPSHEET_SetWizButtons * @@ -2436,12 +2457,17 @@ HWND hwndNext = GetDlgItem(hwndDlg, IDC_NEXT_BUTTON); HWND hwndFinish = GetDlgItem(hwndDlg, IDC_FINISH_BUTTON); +#ifndef DISABLE_USER32_HACKS + LONG Found = FALSE; +#endif + TRACE("%d\n", dwFlags); EnableWindow(hwndBack, FALSE); EnableWindow(hwndNext, FALSE); EnableWindow(hwndFinish, FALSE); +#ifdef DISABLE_USER32_HACKS /* set the default pushbutton to an enabled button */ if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH)) SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0); @@ -2451,6 +2477,7 @@ SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0); else SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0); +#endif if (dwFlags & PSWIZB_BACK) @@ -2482,6 +2509,39 @@ } else if (!(dwFlags & PSWIZB_DISABLEDFINISH)) EnableWindow(hwndFinish, TRUE); + +#ifndef DISABLE_USER32_HACKS + + /* try to find an edit control that deserves focus */ + EnumChildWindows(PropSheet_GetCurrentPageHwnd(hwndDlg), EnumChildProc, (LPARAM)&Found); + + /* set the default pushbutton to an enabled button and give it focus if we didn't find any edit control*/ + if (((dwFlags & PSWIZB_FINISH) || psInfo->hasFinish) && !(dwFlags & PSWIZB_DISABLEDFINISH)) + { + SendMessageW(hwndDlg, DM_SETDEFID, IDC_FINISH_BUTTON, 0); + if(!Found) + SetFocus(hwndFinish); + } + else if (dwFlags & PSWIZB_NEXT) + { + SendMessageW(hwndDlg, DM_SETDEFID, IDC_NEXT_BUTTON, 0); + if(!Found) + SetFocus(hwndNext); + } + else if (dwFlags & PSWIZB_BACK) + { + SendMessageW(hwndDlg, DM_SETDEFID, IDC_BACK_BUTTON, 0); + if(!Found) + SetFocus(hwndBack); + } + else + { + SendMessageW(hwndDlg, DM_SETDEFID, IDCANCEL, 0); + if(!Found) + SetFocus(GetDlgItem(hwndDlg, IDCANCEL)); + } + +#endif } /****************************************************************************** Modified: branches/ros-branch-0_3_12/reactos/dll/win32/comctl32/treeview.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_12/reactos/dll/w…
============================================================================== --- branches/ros-branch-0_3_12/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_12/reactos/dll/win32/comctl32/treeview.c [iso-8859-1] Mon Sep 27 21:12:09 2010 @@ -33,7 +33,8 @@ * * missing styles: TVS_FULLROWSELECT, TVS_INFOTIP, TVS_RTLREADING, * - * missing item styles: TVIS_CUT, TVIS_EXPANDPARTIAL + * missing item styles: TVIS_CUT, TVIS_EXPANDPARTIAL, TVIS_EX_FLAT, + * TVIS_EX_DISABLED * * Make the insertion mark look right. * Scroll (instead of repaint) as much as possible. @@ -1005,7 +1006,7 @@ * inc/dec to toggle the images. */ newItem->iImage = 0; newItem->iSelectedImage = 0; - newItem->iExpandedImage = 0; + newItem->iExpandedImage = (WORD)I_IMAGENONE; if (DPA_InsertPtr(infoPtr->items, INT_MAX, newItem) == -1) { @@ -2142,6 +2143,13 @@ } } } + + if (tvItem->mask & TVIF_STATEEX) + { + FIXME("Extended item state not supported, returning 0.\n"); + tvItem->uStateEx = 0; + } + TRACE("item <%p>, txt %p, img %p, mask %x\n", wineItem, tvItem->pszText, &tvItem->iImage, tvItem->mask); @@ -2575,7 +2583,7 @@ /* The item is currently selected */ imageIndex = wineItem->iSelectedImage; } - else if ((wineItem->state & TVIS_EXPANDED) && (wineItem->iExpandedImage >= 0)) + else if ((wineItem->state & TVIS_EXPANDED) && (wineItem->iExpandedImage != (WORD)I_IMAGENONE)) { /* The item is currently not selected but expanded */ imageIndex = wineItem->iExpandedImage; @@ -2917,6 +2925,7 @@ { hdc = hdc_ref; GetClientRect(infoPtr->hwnd, &rc); + TREEVIEW_FillBkgnd(infoPtr, hdc, &rc); } else { @@ -3309,7 +3318,7 @@ static BOOL TREEVIEW_Expand(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *wineItem, - BOOL bExpandPartial, BOOL bUser) + BOOL partial, BOOL user) { LONG scrollDist; LONG orgNextTop = 0; @@ -3317,7 +3326,7 @@ TREEVIEW_ITEM *nextItem, *tmpItem; BOOL sendsNotifications; - TRACE("(%p, %p, partial=%d, %d\n", infoPtr, wineItem, bExpandPartial, bUser); + TRACE("(%p, %p, partial=%d, %d\n", infoPtr, wineItem, partial, user); if (wineItem->state & TVIS_EXPANDED) return TRUE; @@ -3338,7 +3347,7 @@ TRACE("TVE_EXPAND %p %s\n", wineItem, TREEVIEW_ItemName(wineItem)); - sendsNotifications = bUser || ((wineItem->cChildren != 0) && + sendsNotifications = user || ((wineItem->cChildren != 0) && !(wineItem->state & TVIS_EXPANDEDONCE)); if (sendsNotifications) { @@ -3353,7 +3362,7 @@ wineItem->state |= TVIS_EXPANDED; - if (bExpandPartial) + if (partial) FIXME("TVE_EXPANDPARTIAL not implemented\n"); if (ISVISIBLE(wineItem)) @@ -3417,6 +3426,58 @@ } return TRUE; +} + +/* Handler for TVS_SINGLEEXPAND behaviour. Used on response + to mouse messages and TVM_SELECTITEM. + + selection - previously selected item, used to collapse a part of a tree + item - new selected item +*/ +static void TREEVIEW_SingleExpand(TREEVIEW_INFO *infoPtr, + HTREEITEM selection, HTREEITEM item) +{ + TREEVIEW_ITEM *SelItem; + + if ((infoPtr->dwStyle & TVS_SINGLEEXPAND) == 0 || infoPtr->hwndEdit || !item) return; + + TREEVIEW_SendTreeviewNotify(infoPtr, TVN_SINGLEEXPAND, TVC_UNKNOWN, TVIF_HANDLE | TVIF_PARAM, item, 0); + + /* + * Close the previous selection all the way to the root + * as long as the new selection is not a child + */ + if(selection && (selection != item)) + { + BOOL closeit = TRUE; + SelItem = item; + + /* determine if the hitItem is a child of the currently selected item */ + while(closeit && SelItem && TREEVIEW_ValidItem(infoPtr, SelItem) && + (SelItem->parent != infoPtr->root)) + { + closeit = (SelItem != selection); + SelItem = SelItem->parent; + } + + if(closeit) + { + if(TREEVIEW_ValidItem(infoPtr, selection)) + SelItem = selection; + + while(SelItem && (SelItem != item) && TREEVIEW_ValidItem(infoPtr, SelItem) && + SelItem->parent != infoPtr->root) + { + TREEVIEW_Collapse(infoPtr, SelItem, FALSE, FALSE); + SelItem = SelItem->parent; + } + } + } + + /* + * Expand the current item + */ + TREEVIEW_Expand(infoPtr, item, FALSE, FALSE); } static BOOL @@ -4136,58 +4197,11 @@ } else if (ht.flags & (TVHT_ONITEMICON|TVHT_ONITEMLABEL)) /* select the item if the hit was inside of the icon or text */ { - /* - * if we are TVS_SINGLEEXPAND then we want this single click to - * do a bunch of things. - */ - if((infoPtr->dwStyle & TVS_SINGLEEXPAND) && - (infoPtr->hwndEdit == 0)) - { - TREEVIEW_ITEM *SelItem; - - /* - * Send the notification - */ - TREEVIEW_SendTreeviewNotify(infoPtr, TVN_SINGLEEXPAND, TVC_UNKNOWN, TVIF_HANDLE | TVIF_PARAM, ht.hItem, 0); - - /* - * Close the previous selection all the way to the root - * as long as the new selection is not a child - */ - if((infoPtr->selectedItem) - && (infoPtr->selectedItem != ht.hItem)) - { - BOOL closeit = TRUE; - SelItem = ht.hItem; - - /* determine if the hitItem is a child of the currently selected item */ - while(closeit && SelItem && TREEVIEW_ValidItem(infoPtr, SelItem) && (SelItem != infoPtr->root)) - { - closeit = (SelItem != infoPtr->selectedItem); - SelItem = SelItem->parent; - } - - if(closeit) - { - if(TREEVIEW_ValidItem(infoPtr, infoPtr->selectedItem)) - SelItem = infoPtr->selectedItem; - - while(SelItem && (SelItem != ht.hItem) && TREEVIEW_ValidItem(infoPtr, SelItem) && (SelItem != infoPtr->root)) - { - TREEVIEW_Collapse(infoPtr, SelItem, FALSE, FALSE); - SelItem = SelItem->parent; - } - } - } - - /* - * Expand the current item - */ - TREEVIEW_Expand(infoPtr, ht.hItem, TVE_TOGGLE, FALSE); - } + TREEVIEW_ITEM *selection = infoPtr->selectedItem; /* Select the current item */ TREEVIEW_DoSelectItem(infoPtr, TVGN_CARET, ht.hItem, TVC_BYMOUSE); + TREEVIEW_SingleExpand(infoPtr, selection, ht.hItem); } else if (ht.flags & TVHT_ONITEMSTATEICON) { @@ -4350,6 +4364,9 @@ switch (action) { + case TVGN_CARET|TVSI_NOSINGLEEXPAND: + FIXME("TVSI_NOSINGLEEXPAND specified.\n"); + /* Fall through */ case TVGN_CARET: prevSelect = infoPtr->selectedItem; @@ -4419,13 +4436,17 @@ static LRESULT TREEVIEW_SelectItem(TREEVIEW_INFO *infoPtr, INT wParam, HTREEITEM item) { - if (item != NULL && !TREEVIEW_ValidItem(infoPtr, item)) + TREEVIEW_ITEM *selection = infoPtr->selectedItem; + + if (item && !TREEVIEW_ValidItem(infoPtr, item)) return FALSE; TRACE("%p (%s) %d\n", item, TREEVIEW_ItemName(item), wParam); if (!TREEVIEW_DoSelectItem(infoPtr, wParam, item, TVC_UNKNOWN)) return FALSE; + + TREEVIEW_SingleExpand(infoPtr, selection, item); return TRUE; } @@ -5824,10 +5845,10 @@ /* Tree Verification ****************************************************/ static inline void -TREEVIEW_VerifyChildren(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item); +TREEVIEW_VerifyChildren(TREEVIEW_INFO *infoPtr, const TREEVIEW_ITEM *item); static inline void TREEVIEW_VerifyItemCommon(TREEVIEW_INFO *infoPtr, - TREEVIEW_ITEM *item) + const TREEVIEW_ITEM *item) { assert(infoPtr != NULL); assert(item != NULL); @@ -5866,7 +5887,7 @@ } static inline void -TREEVIEW_VerifyItem(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item) +TREEVIEW_VerifyItem(TREEVIEW_INFO *infoPtr, const TREEVIEW_ITEM *item) { assert(item != NULL); @@ -5882,9 +5903,9 @@ } static inline void -TREEVIEW_VerifyChildren(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item) -{ - TREEVIEW_ITEM *child; +TREEVIEW_VerifyChildren(TREEVIEW_INFO *infoPtr, const TREEVIEW_ITEM *item) +{ + const TREEVIEW_ITEM *child; assert(item != NULL); for (child = item->firstChild; child != NULL; child = child->nextSibling) Modified: branches/ros-branch-0_3_12/reactos/dll/win32/user32/windows/cursoricon.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_12/reactos/dll/w…
============================================================================== --- branches/ros-branch-0_3_12/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_12/reactos/dll/win32/user32/windows/cursoricon.c [iso-8859-1] Mon Sep 27 21:12:09 2010 @@ -485,8 +485,8 @@ else { if (!(*mask = CreateBitmap( width, height, 1, 1, NULL ))) goto done; - if (!(*color = CreateBitmap( width, height, bmi->bmiHeader.biPlanes, - bmi->bmiHeader.biBitCount, NULL ))) + if (!(*color = CreateBitmap( width, height, GetDeviceCaps( screen_dc, PLANES ), + GetDeviceCaps( screen_dc, BITSPIXEL ), NULL ))) { DeleteObject( *mask ); goto done; Modified: branches/ros-branch-0_3_12/reactos/subsystems/win32/win32k/objects/device.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_12/reactos/subsy…
============================================================================== --- branches/ros-branch-0_3_12/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] (original) +++ branches/ros-branch-0_3_12/reactos/subsystems/win32/win32k/objects/device.c [iso-8859-1] Mon Sep 27 21:12:09 2010 @@ -486,6 +486,12 @@ RtlZeroMemory( PrimarySurface.pEDDgpl ,sizeof(EDD_DIRECTDRAW_GLOBAL)); ret = TRUE; } + + gpsi->aiSysMet[SM_CXSCREEN] = PrimarySurface.gdiinfo.ulHorzRes; + gpsi->aiSysMet[SM_CYSCREEN] = PrimarySurface.gdiinfo.ulVertRes; + gpsi->aiSysMet[SM_CXVIRTUALSCREEN] = PrimarySurface.gdiinfo.ulHorzRes; + gpsi->aiSysMet[SM_CYVIRTUALSCREEN] = PrimarySurface.gdiinfo.ulVertRes; + goto cleanup; }
14 years, 2 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
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