EgtMachKernel :
- funzione di controllo chiave portata in Include per essere usata anche al caricamento Dll.
This commit is contained in:
+3
-14
@@ -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) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user