diff --git a/src/Config.h b/src/Config.h index a6b63513..9805c847 100644 --- a/src/Config.h +++ b/src/Config.h @@ -30,7 +30,7 @@ #define VER_LAMEXP_MINOR_LO 4 #define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_PATCH 4 -#define VER_LAMEXP_BUILD 898 +#define VER_LAMEXP_BUILD 899 /////////////////////////////////////////////////////////////////////////////// // Tool versions (minimum expected versions!) diff --git a/src/Tool_Abstract.cpp b/src/Tool_Abstract.cpp index 46dbf9f4..ff8935e8 100644 --- a/src/Tool_Abstract.cpp +++ b/src/Tool_Abstract.cpp @@ -68,11 +68,15 @@ AbstractTool::AbstractTool(void) if(m_jobObjRefCount < 1U) { - if(!CreateJobObjectPtr || !SetInformationJobObjectPtr) + DWORD osVersionNo = lamexp_get_os_version(); + if(((HIWORD(osVersionNo) == 5) && (LOWORD(osVersionNo) >= 1)) || (HIWORD(osVersionNo) > 5)) { - QLibrary Kernel32Lib("kernel32.dll"); - CreateJobObjectPtr = (CreateJobObjectFun) Kernel32Lib.resolve("CreateJobObjectA"); - SetInformationJobObjectPtr = (SetInformationJobObjectFun) Kernel32Lib.resolve("SetInformationJobObject"); + if((!CreateJobObjectPtr) || (!SetInformationJobObjectPtr)) + { + QLibrary Kernel32Lib("kernel32.dll"); + CreateJobObjectPtr = (CreateJobObjectFun) Kernel32Lib.resolve("CreateJobObjectA"); + SetInformationJobObjectPtr = (SetInformationJobObjectFun) Kernel32Lib.resolve("SetInformationJobObject"); + } } if(CreateJobObjectPtr && SetInformationJobObjectPtr) {