EgtMachKernel 1.6c8 :
- aggiornata gestione codici di protezione ( con opzioni).
This commit is contained in:
+13
-9
@@ -18,25 +18,29 @@
|
||||
#include "MachConst.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/SELkKeyProc.h"
|
||||
#include "/EgtDev/Include/EgtKeyCodes.h"
|
||||
#include <new>
|
||||
|
||||
using namespace std ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const int MMG_PROD = 1231 ;
|
||||
const int MMG_VER = 16 ;
|
||||
const int MMG_LEV = 1 ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
IMachMgr*
|
||||
CreateMachMgr( void)
|
||||
{
|
||||
// verifico la chiave
|
||||
int nRet = VerifyKey( GetEMkKey(), MMG_PROD, MMG_VER, MMG_LEV) ;
|
||||
// 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 M.Key (" + ToString( nRet) + ")" ;
|
||||
string sErr = "Error on Key (MKC/" + ToString( nRet) + ")" ;
|
||||
LOG_ERROR( GetEMkLogger(), sErr.c_str()) ;
|
||||
return nullptr ;
|
||||
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) ;
|
||||
|
||||
Reference in New Issue
Block a user