EgtMachKernel :

- funzione di controllo chiave portata in Include per essere usata anche al caricamento Dll.
This commit is contained in:
Dario Sassi
2015-05-26 15:50:45 +00:00
parent 3076dccb4b
commit 4f150f773c
2 changed files with 6 additions and 17 deletions
+3 -14
View File
@@ -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<IMachMgr*> ( new(nothrow) MachMgr) ;
}