diff --git a/EMkDllMain.cpp b/EMkDllMain.cpp index 98a64a8..76d43c1 100644 --- a/EMkDllMain.cpp +++ b/EMkDllMain.cpp @@ -14,9 +14,9 @@ //--------------------------- Include ---------------------------------------- #include "stdafx.h" #include "DllMain.h" -#include "\EgtDev\Include\EMkDllMain.h" -#include "\EgtDev\Include\EgnGetModuleVer.h" -#include "\EgtDev\Include\EgtTrace.h" +#include "/EgtDev/Include/EMkDllMain.h" +#include "/EgtDev/Include/EGnGetModuleVer.h" +#include "/EgtDev/Include/EgtTrace.h" //--------------------------- Costanti ---------------------------------------- #if defined( _WIN64) && defined( _DEBUG) diff --git a/MachMgrBasic.cpp b/MachMgrBasic.cpp index f320ad4..666589d 100644 --- a/MachMgrBasic.cpp +++ b/MachMgrBasic.cpp @@ -13,9 +13,10 @@ //--------------------------- Include ---------------------------------------- #include "stdafx.h" -#include "DllMain.h" #include "MachMgr.h" #include "MachConst.h" +#include "DllMain.h" +#include "/EgtDev/Include/EMkDllMain.h" #include "/EgtDev/Include/EGnStringUtils.h" #include "/EgtDev/Include/EgnFileUtils.h" #include "/EgtDev/Include/EgtKeyCodes.h" @@ -29,20 +30,8 @@ IMachMgr* CreateMachMgr( void) { // verifico la chiave e le opzioni - unsigned int nOpt1, nOpt2 ; - int nOptExpDays ; - int nRet = GetKeyOptions( GetEMkKey(), KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV, - nOpt1, nOpt2, nOptExpDays) ; - if ( nRet != KEY_OK) { - string sErr = "Error on Key (MKC/" + ToString( nRet) + ")" ; - LOG_ERROR( GetEMkLogger(), sErr.c_str()) ; + if ( ! TestKeyForEMk( GetEMkKey(), 0, GetEMkLogger())) return false ; - } - if ( (nOpt1 & KEYOPT_EMK_BASE) == 0 || nOptExpDays < GetCurrDay()) { - string sErr = "Error on Key (MKC/OPT)" ; - LOG_ERROR( GetEMkLogger(), sErr.c_str()) ; - return false ; - } // creo il MachMgr return static_cast ( new(nothrow) MachMgr) ; }