Index: src/libchcore/IOverlappedDataBufferQueue.cpp
===================================================================
diff -u
--- src/libchcore/IOverlappedDataBufferQueue.cpp	(revision 0)
+++ src/libchcore/IOverlappedDataBufferQueue.cpp	(revision ea7d62521e78371cff90579749d136cb928c9e88)
@@ -0,0 +1,28 @@
+// ============================================================================
+//  Copyright (C) 2001-2015 by Jozef Starosczyk
+//  ixen@copyhandler.com
+//
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU Library General Public License
+//  (version 2) as published by the Free Software Foundation;
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+//
+//  You should have received a copy of the GNU Library General Public
+//  License along with this program; if not, write to the
+//  Free Software Foundation, Inc.,
+//  59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+// ============================================================================
+#include "stdafx.h"
+#include "IOverlappedDataBufferQueue.h"
+
+BEGIN_CHCORE_NAMESPACE
+
+IOverlappedDataBufferQueue::~IOverlappedDataBufferQueue()
+{
+}
+
+END_CHCORE_NAMESPACE
Index: src/libchcore/TLocalFilesystem.cpp
===================================================================
diff -u -r6103ac74583f2136b821dc67515ed8469abd8155 -rea7d62521e78371cff90579749d136cb928c9e88
--- src/libchcore/TLocalFilesystem.cpp	(.../TLocalFilesystem.cpp)	(revision 6103ac74583f2136b821dc67515ed8469abd8155)
+++ src/libchcore/TLocalFilesystem.cpp	(.../TLocalFilesystem.cpp)	(revision ea7d62521e78371cff90579749d136cb928c9e88)
@@ -388,12 +388,17 @@
 	Close();
 }
 
+DWORD TLocalFilesystemFile::GetFlagsAndAttributes(bool bNoBuffering) const
+{
+	return FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED | FILE_FLAG_SEQUENTIAL_SCAN | (bNoBuffering ? FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH : 0);
+}
+
 bool TLocalFilesystemFile::OpenExistingForReading(const TSmartPath& pathFile, bool bNoBuffering)
 {
 	Close();
 
 	m_pathFile = TLocalFilesystem::PrependPathExtensionIfNeeded(pathFile);
-	m_hFile = ::CreateFile(m_pathFile.ToString(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN | (bNoBuffering ? FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH : 0), NULL);
+	m_hFile = ::CreateFile(m_pathFile.ToString(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, GetFlagsAndAttributes(bNoBuffering), NULL);
 	if(m_hFile == INVALID_HANDLE_VALUE)
 		return false;
 	
@@ -406,7 +411,7 @@
 	Close();
 
 	m_pathFile = TLocalFilesystem::PrependPathExtensionIfNeeded(pathFile);
-	m_hFile = ::CreateFile(m_pathFile.ToString(), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN | (bNoBuffering ? FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH : 0), NULL);
+	m_hFile = ::CreateFile(m_pathFile.ToString(), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, GetFlagsAndAttributes(bNoBuffering), NULL);
 	if(m_hFile == INVALID_HANDLE_VALUE)
 		return false;
 
@@ -419,7 +424,7 @@
 	Close();
 
 	m_pathFile = TLocalFilesystem::PrependPathExtensionIfNeeded(pathFile);
-	m_hFile = CreateFile(m_pathFile.ToString(), GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_SEQUENTIAL_SCAN | (bNoBuffering ? FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH : 0), NULL);
+	m_hFile = CreateFile(m_pathFile.ToString(), GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_EXISTING, GetFlagsAndAttributes(bNoBuffering), NULL);
 	if(m_hFile == INVALID_HANDLE_VALUE)
 		return false;
 
Index: src/libchcore/TLocalFilesystem.h
===================================================================
diff -u -r6103ac74583f2136b821dc67515ed8469abd8155 -rea7d62521e78371cff90579749d136cb928c9e88
--- src/libchcore/TLocalFilesystem.h	(.../TLocalFilesystem.h)	(revision 6103ac74583f2136b821dc67515ed8469abd8155)
+++ src/libchcore/TLocalFilesystem.h	(.../TLocalFilesystem.h)	(revision ea7d62521e78371cff90579749d136cb928c9e88)
@@ -131,6 +131,7 @@
 
 private:
 	TLocalFilesystemFile();
+	DWORD GetFlagsAndAttributes(bool bNoBuffering) const;
 
 private:
 	TSmartPath m_pathFile;
Index: src/libchcore/TSubTaskCopyMove.cpp
===================================================================
diff -u -r6103ac74583f2136b821dc67515ed8469abd8155 -rea7d62521e78371cff90579749d136cb928c9e88
--- src/libchcore/TSubTaskCopyMove.cpp	(.../TSubTaskCopyMove.cpp)	(revision 6103ac74583f2136b821dc67515ed8469abd8155)
+++ src/libchcore/TSubTaskCopyMove.cpp	(.../TSubTaskCopyMove.cpp)	(revision ea7d62521e78371cff90579749d136cb928c9e88)
@@ -291,23 +291,18 @@
 		return TSubTaskBase::eSubResult_Continue;
 
 	// copying
-	TBufferSizes::EBufferType eBufferIndex = TBufferSizes::eBuffer_Default;
-
 	// recreate buffer if needed
 	AdjustBufferIfNeeded(pData->dbBuffer, pData->tBufferSizes);
 	pData->dbBuffer.DataSourceChanged();
 
 	// establish count of data to read
-	eBufferIndex = GetBufferIndex(pData->tBufferSizes, pData->spSrcFile);
+	TBufferSizes::EBufferType eBufferIndex = GetBufferIndex(pData->tBufferSizes, pData->spSrcFile);
 	m_tSubTaskStats.SetCurrentBufferIndex(eBufferIndex);
 
 	DWORD dwToRead = RoundUp(pData->tBufferSizes.GetSizeByType(eBufferIndex), TLocalFilesystemFile::MaxSectorSize);
 
 	// read data from file to buffer
-	enum
-	{
-		eKillThread = 0, eWriteFinished, eWritePossible, eReadPossible, eHandleCount
-	};
+	enum { eKillThread = 0, eWriteFinished, eWritePossible, eReadPossible, eHandleCount };
 	std::array<HANDLE, eHandleCount> arrHandles = {
 		rThreadController.GetKillThreadHandle(),
 		pData->dbBuffer.GetEventWriteFinishedHandle(),
@@ -337,9 +332,9 @@
 
 		case WAIT_OBJECT_0 + eReadPossible:
 			{
-				ATLTRACE(_T("Read possible\n"));
 				TOverlappedDataBuffer* pBuffer = pData->dbBuffer.GetEmptyBuffer();
-				if(!pBuffer)
+				ATLTRACE(_T("Read possible with buffer %p\n"), pBuffer);
+				if (!pBuffer)
 					THROW_CORE_EXCEPTION(eErr_InternalProblem);
 
 				pBuffer->SetFilePosition(ullNextReadPos);
@@ -362,9 +357,9 @@
 			}
 		case WAIT_OBJECT_0 + eWritePossible:
 			{
-				ATLTRACE(_T("Write possible\n"));
 				TOverlappedDataBuffer* pBuffer = pData->dbBuffer.GetFullBuffer();
-				if(!pBuffer)
+				ATLTRACE(_T("Write possible with buffer %p\n"), pBuffer);
+				if (!pBuffer)
 					THROW_CORE_EXCEPTION(eErr_InternalProblem);
 
 				// was there an error reported?
@@ -421,9 +416,9 @@
 
 		case WAIT_OBJECT_0 + eWriteFinished:
 			{
-				ATLTRACE(_T("Write finished\n"));
 				TOverlappedDataBuffer* pBuffer = pData->dbBuffer.GetFinishedBuffer();
-				if(!pBuffer)
+				ATLTRACE(_T("Write finished with buffer %p\n"), pBuffer);
+				if (!pBuffer)
 					THROW_CORE_EXCEPTION(eErr_InternalProblem);
 
 				if(pBuffer->GetStatusCode() != ERROR_SUCCESS)
@@ -707,7 +702,7 @@
 
 		rLog.logi(strFormat.c_str());
 
-		rBuffer.ReinitializeBuffers(2, rBufferSizes.GetMaxSize());
+		rBuffer.ReinitializeBuffers(5, rBufferSizes.GetMaxSize());
 
 		return true;	// buffer adjusted
 	}
Fisheye: Tag ea7d62521e78371cff90579749d136cb928c9e88 refers to a dead (removed) revision in file `src/libchcore/Tests/TestsTDataBufferManager.cpp'.
Fisheye: No comparison available.  Pass `N' to diff?
Index: src/libchcore/libchcore.vc120.vcxproj
===================================================================
diff -u -r6103ac74583f2136b821dc67515ed8469abd8155 -rea7d62521e78371cff90579749d136cb928c9e88
--- src/libchcore/libchcore.vc120.vcxproj	(.../libchcore.vc120.vcxproj)	(revision 6103ac74583f2136b821dc67515ed8469abd8155)
+++ src/libchcore/libchcore.vc120.vcxproj	(.../libchcore.vc120.vcxproj)	(revision ea7d62521e78371cff90579749d136cb928c9e88)
@@ -643,12 +643,6 @@
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="Tests\TestsTDataBufferManager.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-    </ClCompile>
     <ClCompile Include="Tests\TestsTSimpleTimer.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
Index: src/libchcore/libchcore.vc120.vcxproj.filters
===================================================================
diff -u -r6103ac74583f2136b821dc67515ed8469abd8155 -rea7d62521e78371cff90579749d136cb928c9e88
--- src/libchcore/libchcore.vc120.vcxproj.filters	(.../libchcore.vc120.vcxproj.filters)	(revision 6103ac74583f2136b821dc67515ed8469abd8155)
+++ src/libchcore/libchcore.vc120.vcxproj.filters	(.../libchcore.vc120.vcxproj.filters)	(revision ea7d62521e78371cff90579749d136cb928c9e88)
@@ -592,9 +592,6 @@
     <ClCompile Include="TFileTime.cpp">
       <Filter>Source Files\Tools</Filter>
     </ClCompile>
-    <ClCompile Include="Tests\TestsTDataBufferManager.cpp">
-      <Filter>Tests</Filter>
-    </ClCompile>
     <ClCompile Include="Tests\TestsTSimpleTimer.cpp">
       <Filter>Tests</Filter>
     </ClCompile>