diff --git a/EXE_General.cpp b/EXE_General.cpp index d9fdc28..eab352e 100644 --- a/EXE_General.cpp +++ b/EXE_General.cpp @@ -29,6 +29,7 @@ #include "/EgtDev/Include/EgtLogger.h" #include "/EgtDev/Include/EgtStringConverter.h" #include "/EgtDev/Include/SELkLockId.h" +#include "/EgtDev/Include/SELkKeyProc.h" #include using namespace std ; @@ -296,6 +297,29 @@ ExeGetKeyInfo( string& sKey) return true ; } +//----------------------------------------------------------------------------- +bool +ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& nOpt2) +{ + // verifico la chiave e le opzioni + unsigned int nOpt1 ; + int nOptExpDays ; + int nRet = GetKeyOptions( s_sKey, nProd, nVer, nLev, nOpt1, nOpt2, nOptExpDays) ; + if ( nRet != KEY_OK) { + string sErr = "Error on Key (EGKO/" + ToString( nRet) + ")" ; + LOG_ERROR( s_pGenLog, sErr.c_str()) ; + return false ; + } + if ( nOptExpDays < GetCurrDay()) { + nOpt2 = 0 ; + string sErr = "Error on Key (EGKO/OPT)" ; + LOG_ERROR( s_pGenLog, sErr.c_str()) ; + return true ; + } + + return true ; +} + //----------------------------------------------------------------------------- bool ExeGetOsInfo( string& sOs) diff --git a/EgtExecutor.rc b/EgtExecutor.rc index c29d38f..3d55bd2 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ