diff --git a/EXE_General.cpp b/EXE_General.cpp index 8dd144b..3e27623 100644 --- a/EXE_General.cpp +++ b/EXE_General.cpp @@ -52,6 +52,7 @@ static string s_sKey ; static int s_nKeyType = KEY_LOCK_TYPE_ANY ; static bool s_bNetHwKey = false ; static int s_nKeyExpDays = 0 ; +static int s_nKeyAssExpDays = 0 ; static int s_nKeyOptExpDays = 0 ; static string s_sNestKey ; static string s_sLockId ; @@ -519,7 +520,7 @@ bool ExeGetKeyLevel( int nProd, int nVer, int nLev, int& nKLev) { // verifico la chiave e il livello - int nRet = GetKeyLevel( s_sKey, nProd, nVer, nLev, nKLev, s_nKeyExpDays) ; + int nRet = GetKeyLevelEx( s_sKey, nProd, nVer, nLev, nKLev, s_nKeyExpDays, s_nKeyAssExpDays) ; SetEGnKeyLevel( nRet, nKLev, s_nKeyExpDays) ; if ( nRet != KEY_OK) { string sErr = "Error on Key (EGKL/" + ToString( nRet) + ")" ; @@ -527,7 +528,6 @@ ExeGetKeyLevel( int nProd, int nVer, int nLev, int& nKLev) nKLev = - nRet ; return false ; } - return true ; } @@ -551,7 +551,6 @@ ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& nOpt2) LOG_ERROR( s_pGenLog, sErr.c_str()) ; return true ; } - return true ; } @@ -565,6 +564,16 @@ ExeGetKeyLeftDays( int& nLeftDays) return true ; } +//----------------------------------------------------------------------------- +bool +ExeGetKeyAssLeftDays( int& nAssLeftDays) +{ + if ( s_nKeyAssExpDays == 0) + return false ; + nAssLeftDays = s_nKeyAssExpDays - GetCurrDay() ; + return true ; +} + //----------------------------------------------------------------------------- bool ExeGetKeyOptLeftDays( int& nOptLeftDays) diff --git a/EgtExecutor.rc b/EgtExecutor.rc index 5afb343..f951186 100644 Binary files a/EgtExecutor.rc and b/EgtExecutor.rc differ