diff --git a/PckDll/PckControlCenter/PckControlCenter.cpp b/PckDll/PckControlCenter/PckControlCenter.cpp index 75f91aa..b255765 100644 --- a/PckDll/PckControlCenter/PckControlCenter.cpp +++ b/PckDll/PckControlCenter/PckControlCenter.cpp @@ -15,7 +15,7 @@ #include "PckClassLog.h" #include -const DWORD CPckControlCenter::m_dwNumberOfProcessors = thread::hardware_concurrency(); +//const DWORD CPckControlCenter::m_dwNumberOfProcessors = thread::hardware_concurrency(); CPckControlCenter::CPckControlCenter(): m_lpClassPck(NULL), @@ -39,7 +39,7 @@ void CPckControlCenter::init() cParams.lpPckControlCenter = this; cParams.code_page = 936; cParams.dwCompressLevel = getDefaultCompressLevel(); - cParams.dwMTThread = m_dwNumberOfProcessors; + cParams.dwMTThread = thread::hardware_concurrency(); cParams.dwMTMaxMemory = getMaxMemoryAllowed(); m_lpPckLog = new CPckClassLog(); diff --git a/PckDll/PckControlCenter/PckControlCenter.h b/PckDll/PckControlCenter/PckControlCenter.h index 4bd3977..6d6a4b7 100644 --- a/PckDll/PckControlCenter/PckControlCenter.h +++ b/PckDll/PckControlCenter/PckControlCenter.h @@ -268,8 +268,6 @@ class EXPORT_CLASS CPckControlCenter //格式 FMTPCK m_emunFileFormat; - const static DWORD m_dwNumberOfProcessors; - static FeedbackCallback pFeedbackCallBack; static void* pTag; diff --git a/PckDll/PckControlCenter/PckControlCenterParams.cpp b/PckDll/PckControlCenter/PckControlCenterParams.cpp index d211292..f5751cf 100644 --- a/PckDll/PckControlCenter/PckControlCenterParams.cpp +++ b/PckDll/PckControlCenter/PckControlCenterParams.cpp @@ -11,13 +11,7 @@ ////////////////////////////////////////////////////////////////////// #include "PckControlCenter.h" - - -//LPPCK_RUNTIME_PARAMS CPckControlCenter::GetParams() -//{ -// return &cParams; -//} - +#include #pragma region 线程控制 @@ -96,7 +90,7 @@ void CPckControlCenter::setMaxThread(DWORD dwThread) //线程默认参数 DWORD CPckControlCenter::getMaxThreadUpperLimit() { - return (m_dwNumberOfProcessors + ((m_dwNumberOfProcessors + (m_dwNumberOfProcessors & 1)) >> 1)); + return (thread::hardware_concurrency() + ((thread::hardware_concurrency() + (thread::hardware_concurrency() & 1)) >> 1)); } #pragma endregion diff --git a/PckDll/include/pck_handle.h b/PckDll/include/pck_handle.h index f34fec9..cc3a8ad 100644 --- a/PckDll/include/pck_handle.h +++ b/PckDll/include/pck_handle.h @@ -18,8 +18,8 @@ typedef char * LPSTR; typedef PCK_UNIFIED_FILE_ENTRY* LPPUFE; typedef const PCK_UNIFIED_FILE_ENTRY* CLPPUFE; -#define WINPCK_VERSION "1.30.0.5" -#define WINPCK_VERSION_NUMBER 1,30,0,5 +#define WINPCK_VERSION "1.30.0.6" +#define WINPCK_VERSION_NUMBER 1,30,0,6 typedef enum _PCKRTN { diff --git a/Release/WinPCK_x64.exe b/Release/WinPCK_x64.exe index 254c0fa..a162309 100644 Binary files a/Release/WinPCK_x64.exe and b/Release/WinPCK_x64.exe differ diff --git a/Release/WinPCK_x86.exe b/Release/WinPCK_x86.exe index c0cd84d..cb4a64c 100644 Binary files a/Release/WinPCK_x86.exe and b/Release/WinPCK_x86.exe differ diff --git a/Release/pckdll_x64.dll b/Release/pckdll_x64.dll index e7aa44c..eb5473d 100644 Binary files a/Release/pckdll_x64.dll and b/Release/pckdll_x64.dll differ diff --git a/Release/pckdll_x86.dll b/Release/pckdll_x86.dll index 0ce8fe9..e7de4ee 100644 Binary files a/Release/pckdll_x86.dll and b/Release/pckdll_x86.dll differ diff --git a/Release_static/WinPCK_x64.exe b/Release_static/WinPCK_x64.exe index 0ca8f65..d6fecb8 100644 Binary files a/Release_static/WinPCK_x64.exe and b/Release_static/WinPCK_x64.exe differ diff --git a/Release_static/WinPCK_x86.exe b/Release_static/WinPCK_x86.exe index b6d97bb..6953c97 100644 Binary files a/Release_static/WinPCK_x86.exe and b/Release_static/WinPCK_x86.exe differ