From 03785dcca3120595829ea0f6bf9fda24054aea42 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 25 Jan 2024 18:20:31 +0100 Subject: [PATCH] EgtExecutor 2.6a2 : - aggiunta ExeGetKeyAssLeftDays per avere il numero di giorni mancanti al termine dell'assistenza. --- EXE_General.cpp | 15 ++++++++++++--- EgtExecutor.rc | Bin 18890 -> 18890 bytes 2 files changed, 12 insertions(+), 3 deletions(-) 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 5afb3433a9108552a4e7814c157583d1d111c0dd..f95118646044162b51708d36a765491f1a3f15e2 100644 GIT binary patch delta 81 zcmX>#neo(Q#tpyN7>zdnW^-i*QjT29S-`yGOp`YVRxuh)cH~Ol+$UrM5m>XaK delta 81 zcmX>#neo(Q#tpyN7!5c7W^-i*QjT29S-`yGOp`YVRxuh*cH~Ol+$UrM5