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
June 2015
----- 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
13 participants
343 discussions
Start a n
N
ew thread
[tfaber] 68217: [SHELL32] - Test your code, Arch! Fix another assertion failure. CORE-9845 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Jun 21 04:56:38 2015 New Revision: 68217 URL:
http://svn.reactos.org/svn/reactos?rev=68217&view=rev
Log: [SHELL32] - Test your code, Arch! Fix another assertion failure. CORE-9845 #resolve Modified: trunk/reactos/include/reactos/shellutils.h Modified: trunk/reactos/include/reactos/shellutils.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/shellutils…
============================================================================== --- trunk/reactos/include/reactos/shellutils.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/shellutils.h [iso-8859-1] Sun Jun 21 04:56:38 2015 @@ -67,10 +67,8 @@ return hr; } if (InterlockedCompareExchangePointer((PVOID *)&s_pInstance, pObj, NULL)) - { static_cast<IUnknown *>(pObj)->Release(); - s_IsTerminated = false; - } + s_IsTerminated = false; } return s_pInstance->QueryInterface(riid, ppv); }
9 years, 6 months
1
0
0
0
[aandrejevic] 68216: [NTVDM] Begin upgrading the VGA emulation to SuperVGA emulation (Cirrus Logic CL-GD5343 compatible). This is still a WIP. So far only the VCLK and MCLK have been implemented.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Sun Jun 21 02:36:20 2015 New Revision: 68216 URL:
http://svn.reactos.org/svn/reactos?rev=68216&view=rev
Log: [NTVDM] Begin upgrading the VGA emulation to SuperVGA emulation (Cirrus Logic CL-GD5343 compatible). This is still a WIP. So far only the VCLK and MCLK have been implemented. Added: trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/svga.c - copied, changed from r68214, trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.c trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/svga.h - copied, changed from r68214, trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.h Removed: trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.c trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.h Modified: trunk/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c trunk/reactos/subsystems/mvdm/ntvdm/clock.c trunk/reactos/subsystems/mvdm/ntvdm/cpu/cpu.c trunk/reactos/subsystems/mvdm/ntvdm/dos/mouse32.c trunk/reactos/subsystems/mvdm/ntvdm/emulator.c trunk/reactos/subsystems/mvdm/ntvdm/hardware/mouse.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/subsystems/mvdm/ntvdm/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/CMak…
Modified: trunk/reactos/subsystems/mvdm/ntvdm/bios/vidbios.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/bios…
Modified: trunk/reactos/subsystems/mvdm/ntvdm/clock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/cloc…
Modified: trunk/reactos/subsystems/mvdm/ntvdm/cpu/cpu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/cpu/…
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/mouse32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
Modified: trunk/reactos/subsystems/mvdm/ntvdm/emulator.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/emul…
Modified: trunk/reactos/subsystems/mvdm/ntvdm/hardware/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
Copied: trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/svga.c (from r68214, trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
Copied: trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/svga.h (from r68214, trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.h) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
Removed: trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
Removed: trunk/reactos/subsystems/mvdm/ntvdm/hardware/video/vga.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/hard…
9 years, 6 months
1
0
0
0
[tfaber] 68215: [SHELL32] - Fix assertion failure in 2nd stage by setting s_IsTerminated when an instance does not yet exist. - Rename CComCreatorSingleton to CComCreatorCentralInstance since it's ...
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jun 20 21:46:16 2015 New Revision: 68215 URL:
http://svn.reactos.org/svn/reactos?rev=68215&view=rev
Log: [SHELL32] - Fix assertion failure in 2nd stage by setting s_IsTerminated when an instance does not yet exist. - Rename CComCreatorSingleton to CComCreatorCentralInstance since it's not /technically/ a singleton Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.h trunk/reactos/dll/win32/shell32/shell32.cpp trunk/reactos/include/reactos/shellutils.h Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h [iso-8859-1] Sat Jun 20 21:46:16 2015 @@ -79,7 +79,7 @@ virtual HRESULT WINAPI CopyItems(IShellFolder *pSFFrom, UINT cidl, LPCITEMIDLIST *apidl, BOOL bCopy); DECLARE_REGISTRY_RESOURCEID(IDR_SHELLDESKTOP) - DECLARE_SINGLETON_NOT_AGGREGATABLE(CDesktopFolder) + DECLARE_CENTRAL_INSTANCE_NOT_AGGREGATABLE(CDesktopFolder) DECLARE_PROTECT_FINAL_CONSTRUCT() Modified: trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.h [iso-8859-1] Sat Jun 20 21:46:16 2015 @@ -69,7 +69,7 @@ virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); DECLARE_REGISTRY_RESOURCEID(IDR_MYCOMPUTER) - DECLARE_SINGLETON_NOT_AGGREGATABLE(CDrivesFolder) + DECLARE_CENTRAL_INSTANCE_NOT_AGGREGATABLE(CDrivesFolder) DECLARE_PROTECT_FINAL_CONSTRUCT() Modified: trunk/reactos/dll/win32/shell32/shell32.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
============================================================================== --- trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] Sat Jun 20 21:46:16 2015 @@ -151,8 +151,8 @@ public: void Term() { - CComCreatorSingleton< ATL::CComObject< CDrivesFolder > >::Term(); - CComCreatorSingleton< ATL::CComObject< CDesktopFolder > >::Term(); + CComCreatorCentralInstance< ATL::CComObject< CDrivesFolder > >::Term(); + CComCreatorCentralInstance< ATL::CComObject< CDesktopFolder > >::Term(); CComModule::Term(); } }; Modified: trunk/reactos/include/reactos/shellutils.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/shellutils…
============================================================================== --- trunk/reactos/include/reactos/shellutils.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/shellutils.h [iso-8859-1] Sat Jun 20 21:46:16 2015 @@ -43,7 +43,7 @@ #ifdef __cplusplus template <typename T> -class CComCreatorSingleton +class CComCreatorCentralInstance { private: static IUnknown *s_pInstance; @@ -59,11 +59,18 @@ { PVOID pObj; HRESULT hr; + s_IsTerminated = true; hr = ATL::CComCreator< T >::CreateInstance(NULL, IID_IUnknown, &pObj); if (FAILED(hr)) + { + s_IsTerminated = false; return hr; + } if (InterlockedCompareExchangePointer((PVOID *)&s_pInstance, pObj, NULL)) + { static_cast<IUnknown *>(pObj)->Release(); + s_IsTerminated = false; + } } return s_pInstance->QueryInterface(riid, ppv); } @@ -87,14 +94,14 @@ }; template <typename T> -IUnknown *CComCreatorSingleton<T>::s_pInstance = NULL; +IUnknown *CComCreatorCentralInstance<T>::s_pInstance = NULL; template <typename T> -bool CComCreatorSingleton<T>::s_IsTerminated = false; - -#define DECLARE_SINGLETON_NOT_AGGREGATABLE(x) \ +bool CComCreatorCentralInstance<T>::s_IsTerminated = false; + +#define DECLARE_CENTRAL_INSTANCE_NOT_AGGREGATABLE(x) \ public: \ - typedef CComCreatorSingleton< ATL::CComObject<x> > _CreatorClass; + typedef CComCreatorCentralInstance< ATL::CComObject<x> > _CreatorClass; #endif #ifdef __cplusplus
9 years, 6 months
1
0
0
0
[ekohl] 68214: [USETUP] DumpPartitionTable: Improve the output and print the partition start and length in sectors instead of bytes.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jun 20 18:17:03 2015 New Revision: 68214 URL:
http://svn.reactos.org/svn/reactos?rev=68214&view=rev
Log: [USETUP] DumpPartitionTable: Improve the output and print the partition start and length in sectors instead of bytes. Modified: trunk/reactos/base/setup/usetup/partlist.c Modified: trunk/reactos/base/setup/usetup/partlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
============================================================================== --- trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] Sat Jun 20 18:17:03 2015 @@ -44,19 +44,25 @@ PPARTITION_INFORMATION PartitionInfo; ULONG i; + DbgPrint("\n"); + DbgPrint("Index Start Length Hidden Nr Type Boot RW\n"); + DbgPrint("----- ------------ ------------ ---------- -- ---- ---- --\n"); + for (i = 0; i < DiskEntry->LayoutBuffer->PartitionCount; i++) { PartitionInfo = &DiskEntry->LayoutBuffer->PartitionEntry[i]; - DPRINT1("\n%lu: %12I64u %12I64u %10lu %2lu %2x %c %c\n", - i, - PartitionInfo->StartingOffset.QuadPart, - PartitionInfo->PartitionLength.QuadPart, - PartitionInfo->HiddenSectors, - PartitionInfo->PartitionNumber, - PartitionInfo->PartitionType, - PartitionInfo->BootIndicator ? '*': ' ', - PartitionInfo->RewritePartition ? 'Y': 'N'); - } + DbgPrint(" %3lu %12I64u %12I64u %10lu %2lu %2x %c %c\n", + i, + PartitionInfo->StartingOffset.QuadPart / DiskEntry->BytesPerSector, + PartitionInfo->PartitionLength.QuadPart / DiskEntry->BytesPerSector, + PartitionInfo->HiddenSectors, + PartitionInfo->PartitionNumber, + PartitionInfo->PartitionType, + PartitionInfo->BootIndicator ? '*': ' ', + PartitionInfo->RewritePartition ? 'Y': 'N'); + } + + DbgPrint("\n"); } #endif
9 years, 6 months
1
0
0
0
[ekohl] 68213: [USETUP] AddDiskToList: Fix the allocation of the disk layout buffer. CORE-9821 #resolve #comment Please retest.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Jun 20 17:59:14 2015 New Revision: 68213 URL:
http://svn.reactos.org/svn/reactos?rev=68213&view=rev
Log: [USETUP] AddDiskToList: Fix the allocation of the disk layout buffer. CORE-9821 #resolve #comment Please retest. Modified: trunk/reactos/base/setup/usetup/partlist.c Modified: trunk/reactos/base/setup/usetup/partlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
============================================================================== --- trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] Sat Jun 20 17:59:14 2015 @@ -974,6 +974,7 @@ PLIST_ENTRY ListEntry; PBIOSDISKENTRY BiosDiskEntry; ULONG LayoutBufferSize; + PDRIVE_LAYOUT_INFORMATION NewLayoutBuffer; Status = NtDeviceIoControlFile(FileHandle, NULL, @@ -1150,37 +1151,13 @@ LayoutBufferSize); if (DiskEntry->LayoutBuffer == NULL) { + DPRINT1("Failed to allocate the disk layout buffer!\n"); return; } - Status = NtDeviceIoControlFile(FileHandle, - NULL, - NULL, - NULL, - &Iosb, - IOCTL_DISK_GET_DRIVE_LAYOUT, - NULL, - 0, - DiskEntry->LayoutBuffer, - LayoutBufferSize); - DPRINT("Status: 0x%08lx\n", Status); - DPRINT("PartitionCount: %lu\n", DiskEntry->LayoutBuffer->PartitionCount); - - /* If we need more than 4 partition entries, reallocte the buffer and - retrieve the disk layout again */ - if (!NT_SUCCESS(Status) && DiskEntry->LayoutBuffer->PartitionCount > 4) - { - LayoutBufferSize = sizeof(DRIVE_LAYOUT_INFORMATION) + - ((DiskEntry->LayoutBuffer->PartitionCount - ANYSIZE_ARRAY) * sizeof(PARTITION_INFORMATION)); - DiskEntry->LayoutBuffer = RtlReAllocateHeap(ProcessHeap, - HEAP_ZERO_MEMORY, - DiskEntry->LayoutBuffer, - LayoutBufferSize); - if (DiskEntry->LayoutBuffer == NULL) - { - return; - } - + for (;;) + { + DPRINT1("Buffer size: %lu\n", LayoutBufferSize); Status = NtDeviceIoControlFile(FileHandle, NULL, NULL, @@ -1191,62 +1168,82 @@ 0, DiskEntry->LayoutBuffer, LayoutBufferSize); - } - - if (NT_SUCCESS(Status)) - { + if (NT_SUCCESS(Status)) + break; + + if (Status != STATUS_BUFFER_TOO_SMALL) + { + DPRINT1("NtDeviceIoControlFile() failed (Status: 0x%08lx)\n", Status); + return; + } + + LayoutBufferSize += 4 * sizeof(PARTITION_INFORMATION); + NewLayoutBuffer = RtlReAllocateHeap(ProcessHeap, + HEAP_ZERO_MEMORY, + DiskEntry->LayoutBuffer, + LayoutBufferSize); + if (NewLayoutBuffer == NULL) + { + DPRINT1("Failed to reallocate the disk layout buffer!\n"); + return; + } + + DiskEntry->LayoutBuffer = NewLayoutBuffer; + } + + DPRINT1("PartitionCount: %lu\n", DiskEntry->LayoutBuffer->PartitionCount); + #ifdef DUMP_PARTITION_TABLE - DumpPartitionTable(DiskEntry); + DumpPartitionTable(DiskEntry); #endif - if (DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart != 0 && - DiskEntry->LayoutBuffer->PartitionEntry[0].PartitionLength.QuadPart != 0 && - DiskEntry->LayoutBuffer->PartitionEntry[0].PartitionType != 0) - { - if ((DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart / DiskEntry->BytesPerSector) % DiskEntry->SectorsPerTrack == 0) - { - DPRINT("Use %lu Sector alignment!\n", DiskEntry->SectorsPerTrack); - } - else if (DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart % (1024 * 1024) == 0) - { - DPRINT1("Use megabyte (%lu Sectors) alignment!\n", (1024 * 1024) / DiskEntry->BytesPerSector); - } - else - { - DPRINT1("No matching aligment found! Partiton 1 starts at %I64u\n", DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart); - } + if (DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart != 0 && + DiskEntry->LayoutBuffer->PartitionEntry[0].PartitionLength.QuadPart != 0 && + DiskEntry->LayoutBuffer->PartitionEntry[0].PartitionType != 0) + { + if ((DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart / DiskEntry->BytesPerSector) % DiskEntry->SectorsPerTrack == 0) + { + DPRINT("Use %lu Sector alignment!\n", DiskEntry->SectorsPerTrack); + } + else if (DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart % (1024 * 1024) == 0) + { + DPRINT1("Use megabyte (%lu Sectors) alignment!\n", (1024 * 1024) / DiskEntry->BytesPerSector); } else { - DPRINT1("No valid partiton table found! Use megabyte (%lu Sectors) alignment!\n", (1024 * 1024) / DiskEntry->BytesPerSector); - } - - - if (DiskEntry->LayoutBuffer->PartitionCount == 0) - { - DiskEntry->NewDisk = TRUE; - DiskEntry->LayoutBuffer->PartitionCount = 4; - - for (i = 0; i < 4; i++) - DiskEntry->LayoutBuffer->PartitionEntry[i].RewritePartition = TRUE; - } - else - { - for (i = 0; i < 4; i++) - { - AddPartitionToDisk(DiskNumber, - DiskEntry, - i, - FALSE); - } - - for (i = 4; i < DiskEntry->LayoutBuffer->PartitionCount; i += 4) - { - AddPartitionToDisk(DiskNumber, - DiskEntry, - i, - TRUE); - } + DPRINT1("No matching aligment found! Partiton 1 starts at %I64u\n", DiskEntry->LayoutBuffer->PartitionEntry[0].StartingOffset.QuadPart); + } + } + else + { + DPRINT1("No valid partiton table found! Use megabyte (%lu Sectors) alignment!\n", (1024 * 1024) / DiskEntry->BytesPerSector); + } + + + if (DiskEntry->LayoutBuffer->PartitionCount == 0) + { + DiskEntry->NewDisk = TRUE; + DiskEntry->LayoutBuffer->PartitionCount = 4; + + for (i = 0; i < 4; i++) + DiskEntry->LayoutBuffer->PartitionEntry[i].RewritePartition = TRUE; + } + else + { + for (i = 0; i < 4; i++) + { + AddPartitionToDisk(DiskNumber, + DiskEntry, + i, + FALSE); + } + + for (i = 4; i < DiskEntry->LayoutBuffer->PartitionCount; i += 4) + { + AddPartitionToDisk(DiskNumber, + DiskEntry, + i, + TRUE); } }
9 years, 6 months
1
0
0
0
[tfaber] 68212: [SHELL32] - Also make My Computer a singleton, as shown by the CMyComputer test. With r68210 and this commit, SHFileOperation on a large number of files is approximately 3 times as ...
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jun 20 17:52:28 2015 New Revision: 68212 URL:
http://svn.reactos.org/svn/reactos?rev=68212&view=rev
Log: [SHELL32] - Also make My Computer a singleton, as shown by the CMyComputer test. With r68210 and this commit, SHFileOperation on a large number of files is approximately 3 times as fast. CORE-9839 #resolve Modified: trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.h trunk/reactos/dll/win32/shell32/shell32.cpp Modified: trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.cpp [iso-8859-1] Sat Jun 20 17:52:28 2015 @@ -161,6 +161,7 @@ CDrivesFolder::~CDrivesFolder() { TRACE ("-- destroying IShellFolder(%p)\n", this); + ASSERT(_CreatorClass::IsTerminated()); SHFree(pidlRoot); } Modified: trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDrivesFolder.h [iso-8859-1] Sat Jun 20 17:52:28 2015 @@ -69,7 +69,7 @@ virtual HRESULT WINAPI GetCurFolder(LPITEMIDLIST * pidl); DECLARE_REGISTRY_RESOURCEID(IDR_MYCOMPUTER) - DECLARE_NOT_AGGREGATABLE(CDrivesFolder) + DECLARE_SINGLETON_NOT_AGGREGATABLE(CDrivesFolder) DECLARE_PROTECT_FINAL_CONSTRUCT() Modified: trunk/reactos/dll/win32/shell32/shell32.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
============================================================================== --- trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] Sat Jun 20 17:52:28 2015 @@ -151,6 +151,7 @@ public: void Term() { + CComCreatorSingleton< ATL::CComObject< CDrivesFolder > >::Term(); CComCreatorSingleton< ATL::CComObject< CDesktopFolder > >::Term(); CComModule::Term(); }
9 years, 6 months
1
0
0
0
[tfaber] 68211: [GRML] - Fix build
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jun 20 17:04:27 2015 New Revision: 68211 URL:
http://svn.reactos.org/svn/reactos?rev=68211&view=rev
Log: [GRML] - Fix build Modified: trunk/reactos/include/reactos/shellutils.h Modified: trunk/reactos/include/reactos/shellutils.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/shellutils…
============================================================================== --- trunk/reactos/include/reactos/shellutils.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/shellutils.h [iso-8859-1] Sat Jun 20 17:04:27 2015 @@ -70,12 +70,16 @@ static void Term() { ULONG ref; +#ifdef ASSERT ASSERT(!s_IsTerminated); +#endif s_IsTerminated = true; if (s_pInstance) { ref = s_pInstance->Release(); +#ifdef ASSERT ASSERT(ref == 0); +#endif s_pInstance = NULL; } }
9 years, 6 months
1
0
0
0
[tfaber] 68210: [SHELL32] - Introduce a CComCreatorSingleton class and use it for CDesktopFolder. Multiple calls to SHGetDesktopFolder will now return the same instance, which provides a massive sp...
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jun 20 16:54:52 2015 New Revision: 68210 URL:
http://svn.reactos.org/svn/reactos?rev=68210&view=rev
Log: [SHELL32] - Introduce a CComCreatorSingleton class and use it for CDesktopFolder. Multiple calls to SHGetDesktopFolder will now return the same instance, which provides a massive speedup in many shell operations. CORE-9839 Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h trunk/reactos/dll/win32/shell32/shell32.cpp trunk/reactos/include/reactos/shellutils.h Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] Sat Jun 20 16:54:52 2015 @@ -287,6 +287,7 @@ CDesktopFolder::~CDesktopFolder() { + ASSERT(_CreatorClass::IsTerminated()); } HRESULT WINAPI CDesktopFolder::FinalConstruct() Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.h [iso-8859-1] Sat Jun 20 16:54:52 2015 @@ -34,7 +34,7 @@ /* both paths are parsible from the desktop */ LPWSTR sPathTarget; /* complete path to target used for enumeration and ChangeNotify */ LPITEMIDLIST pidlRoot; /* absolute pidl */ - + virtual HRESULT WINAPI _GetDropTarget(LPCITEMIDLIST pidl, LPVOID *ppvOut); public: @@ -79,7 +79,7 @@ virtual HRESULT WINAPI CopyItems(IShellFolder *pSFFrom, UINT cidl, LPCITEMIDLIST *apidl, BOOL bCopy); DECLARE_REGISTRY_RESOURCEID(IDR_SHELLDESKTOP) - DECLARE_NOT_AGGREGATABLE(CDesktopFolder) + DECLARE_SINGLETON_NOT_AGGREGATABLE(CDesktopFolder) DECLARE_PROTECT_FINAL_CONSTRUCT() Modified: trunk/reactos/dll/win32/shell32/shell32.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shell32.…
============================================================================== --- trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/shell32.cpp [iso-8859-1] Sat Jun 20 16:54:52 2015 @@ -149,6 +149,11 @@ class CShell32Module : public CComModule { public: + void Term() + { + CComCreatorSingleton< ATL::CComObject< CDesktopFolder > >::Term(); + CComModule::Term(); + } }; Modified: trunk/reactos/include/reactos/shellutils.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/shellutils…
============================================================================== --- trunk/reactos/include/reactos/shellutils.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/shellutils.h [iso-8859-1] Sat Jun 20 16:54:52 2015 @@ -40,6 +40,58 @@ #ifdef __cplusplus } /* extern "C" */ #endif /* defined(__cplusplus) */ + +#ifdef __cplusplus +template <typename T> +class CComCreatorSingleton +{ +private: + static IUnknown *s_pInstance; + static bool s_IsTerminated; + +public: + static HRESULT WINAPI CreateInstance(void *pv, REFIID riid, LPVOID *ppv) + { + *ppv = NULL; + if (pv != NULL) + return CLASS_E_NOAGGREGATION; + if (!s_pInstance) + { + PVOID pObj; + HRESULT hr; + hr = ATL::CComCreator< T >::CreateInstance(NULL, IID_IUnknown, &pObj); + if (FAILED(hr)) + return hr; + if (InterlockedCompareExchangePointer((PVOID *)&s_pInstance, pObj, NULL)) + static_cast<IUnknown *>(pObj)->Release(); + } + return s_pInstance->QueryInterface(riid, ppv); + } + static void Term() + { + ULONG ref; + ASSERT(!s_IsTerminated); + s_IsTerminated = true; + if (s_pInstance) + { + ref = s_pInstance->Release(); + ASSERT(ref == 0); + s_pInstance = NULL; + } + } + static bool IsTerminated() { return s_IsTerminated; } +}; + +template <typename T> +IUnknown *CComCreatorSingleton<T>::s_pInstance = NULL; + +template <typename T> +bool CComCreatorSingleton<T>::s_IsTerminated = false; + +#define DECLARE_SINGLETON_NOT_AGGREGATABLE(x) \ +public: \ + typedef CComCreatorSingleton< ATL::CComObject<x> > _CreatorClass; +#endif #ifdef __cplusplus template <class Base>
9 years, 6 months
1
0
0
0
[tfaber] 68209: [SHELL32_APITEST] - Add a test for CLSID_MyComputer that shows this folder object is also cached. CORE-9839
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jun 20 16:28:38 2015 New Revision: 68209 URL:
http://svn.reactos.org/svn/reactos?rev=68209&view=rev
Log: [SHELL32_APITEST] - Add a test for CLSID_MyComputer that shows this folder object is also cached. CORE-9839 Added: trunk/rostests/apitests/shell32/CMyComputer.cpp (with props) Modified: trunk/rostests/apitests/shell32/CMakeLists.txt trunk/rostests/apitests/shell32/testlist.c Modified: trunk/rostests/apitests/shell32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/shell32/CMakeLis…
============================================================================== --- trunk/rostests/apitests/shell32/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/shell32/CMakeLists.txt [iso-8859-1] Sat Jun 20 16:28:38 2015 @@ -4,6 +4,7 @@ include_directories(${REACTOS_SOURCE_DIR}/lib/atl) add_executable(shell32_apitest + CMyComputer.cpp CShellDesktop.cpp menu.cpp testlist.c) Added: trunk/rostests/apitests/shell32/CMyComputer.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/shell32/CMyCompu…
============================================================================== --- trunk/rostests/apitests/shell32/CMyComputer.cpp (added) +++ trunk/rostests/apitests/shell32/CMyComputer.cpp [iso-8859-1] Sat Jun 20 16:28:38 2015 @@ -0,0 +1,81 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory + * PURPOSE: Test for CMyComputer + * PROGRAMMER: Thomas Faber <thomas.faber(a)reactos.org> + */ + +#include "shelltest.h" +#include <atlbase.h> +#include <atlcom.h> +#include <strsafe.h> + +#define NDEBUG +#include <debug.h> +#include <shellutils.h> + +static +VOID +TestShellFolder( + _In_ IShellFolder2 *psf2) +{ + HRESULT hr; + CComPtr<IDropTarget> pdt; + CComPtr<IDropTarget> pdt_2; + CComPtr<IContextMenu> pcm; + CComPtr<IContextMenu> pcm_2; + CComPtr<IShellView> psv; + CComPtr<IShellView> psv_2; + + hr = psf2->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget, &pdt)); + ok(hr == S_OK, "hr = %lx\n", hr); + + hr = psf2->CreateViewObject(NULL, IID_PPV_ARG(IDropTarget, &pdt_2)); + ok(hr == S_OK, "hr = %lx\n", hr); + ok(pdt != pdt_2, "Expected %p != %p\n", static_cast<PVOID>(pdt), static_cast<PVOID>(pdt_2)); + + hr = psf2->CreateViewObject(NULL, IID_PPV_ARG(IContextMenu, &pcm)); + ok(hr == S_OK, "hr = %lx\n", hr); + + hr = psf2->CreateViewObject(NULL, IID_PPV_ARG(IContextMenu, &pcm_2)); + ok(hr == S_OK, "hr = %lx\n", hr); + ok(pcm != pcm_2, "Expected %p != %p\n", static_cast<PVOID>(pcm), static_cast<PVOID>(pcm_2)); + + hr = psf2->CreateViewObject(NULL, IID_PPV_ARG(IShellView, &psv)); + ok(hr == S_OK, "hr = %lx\n", hr); + + hr = psf2->CreateViewObject(NULL, IID_PPV_ARG(IShellView, &psv_2)); + ok(hr == S_OK, "hr = %lx\n", hr); + ok(psv != psv_2, "Expected %p != %p\n", static_cast<PVOID>(psv), static_cast<PVOID>(psv_2)); +} + +START_TEST(CMyComputer) +{ + HRESULT hr; + CComPtr<IShellFolder2> psf2; + CComPtr<IShellFolder2> psf2_2; + CComPtr<IShellFolder> psf; + + CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); + + hr = CoCreateInstance(CLSID_MyComputer, + NULL, + CLSCTX_INPROC_SERVER, + IID_PPV_ARG(IShellFolder2, &psf2)); + ok(hr == S_OK, "hr = %lx\n", hr); + if (FAILED(hr)) + { + skip("Could not instantiate CShellDesktop\n"); + return; + } + + /* second create should give us a pointer to the same object */ + hr = CoCreateInstance(CLSID_MyComputer, + NULL, + CLSCTX_INPROC_SERVER, + IID_PPV_ARG(IShellFolder2, &psf2_2)); + ok(hr == S_OK, "hr = %lx\n", hr); + ok(psf2 == psf2_2, "Expected %p == %p\n", static_cast<PVOID>(psf2), static_cast<PVOID>(psf2_2)); + + TestShellFolder(psf2); +} Propchange: trunk/rostests/apitests/shell32/CMyComputer.cpp ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/apitests/shell32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/shell32/testlist…
============================================================================== --- trunk/rostests/apitests/shell32/testlist.c [iso-8859-1] (original) +++ trunk/rostests/apitests/shell32/testlist.c [iso-8859-1] Sat Jun 20 16:28:38 2015 @@ -3,11 +3,13 @@ #define STANDALONE #include <wine/test.h> +extern void func_CMyComputer(void); extern void func_CShellDesktop(void); extern void func_menu(void); const struct test winetest_testlist[] = { + { "CMyComputer", func_CMyComputer }, { "CShellDesktop", func_CShellDesktop }, { "menu", func_menu }, { 0, 0 }
9 years, 6 months
1
0
0
0
[tfaber] 68208: [SHELL32] - Addendum to r68202 CORE-9839
by tfaber@svn.reactos.org
Author: tfaber Date: Sat Jun 20 15:23:25 2015 New Revision: 68208 URL:
http://svn.reactos.org/svn/reactos?rev=68208&view=rev
Log: [SHELL32] - Addendum to r68202 CORE-9839 Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp Modified: trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
============================================================================== --- trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/win32/shell32/folders/CDesktopFolder.cpp [iso-8859-1] Sat Jun 20 15:23:25 2015 @@ -640,7 +640,7 @@ if (cidl != 1 || FAILED(hr = this->_GetDropTarget(apidl[0], (LPVOID*) &pObj))) { IDropTarget * pDt = NULL; - hr = this->QueryInterface(IID_PPV_ARG(IDropTarget, &pDt)); + hr = ShellObjectCreatorInit<CDesktopFolderDropTarget>(this, IID_IDropTarget, &pDt); pObj = pDt; } }
9 years, 6 months
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
...
35
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
29
30
31
32
33
34
35
Results per page:
10
25
50
100
200