EgtGraphics 2.5e5 :
- migliorato controllo gestione chiave di rete.
This commit is contained in:
+30
-2
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2014-2014
|
||||
// EgalTech 2014-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGrDllMain.cpp Data : 13.02.14 Versione : 1.5b1
|
||||
// File : EGrDllMain.cpp Data : 30.05.23 Versione : 2.5e
|
||||
// Contenuto : Inizializzazione della DLL.
|
||||
//
|
||||
//
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "DllMain.h"
|
||||
#include "/EgtDev/Include/EGrDllMain.h"
|
||||
#include "/EgtDev/Include/EGnGetModuleVer.h"
|
||||
#include "/EgtDev/Include/EGnGetKeyData.h"
|
||||
#include "/EgtDev/Include/EgtTrace.h"
|
||||
|
||||
//--------------------------- Costanti ----------------------------------------
|
||||
@@ -118,3 +119,30 @@ GetEGrNetHwKey( void)
|
||||
{
|
||||
return s_bNetHwKey ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
VerifyKey( int nKeyOpt)
|
||||
{
|
||||
// Controllo della licenza
|
||||
unsigned int nOpt1, nOpt2 ;
|
||||
int nOptExpDays ;
|
||||
int nRet = GetEGnKeyOptions( KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV,
|
||||
nOpt1, nOpt2, nOptExpDays) ;
|
||||
if ( ! GetEGrNetHwKey())
|
||||
nRet = GetKeyOptions( GetEGrKey(), KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV,
|
||||
nOpt1, nOpt2, nOptExpDays) ;
|
||||
if ( nRet != KEY_OK) {
|
||||
std::string sErr = "Error on Key (GRC/" + ToString( nRet) + ")" ;
|
||||
LOG_ERROR( GetEGrLogger(), sErr.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
if ( ( nOpt1 & KEYOPT_EGR_BASE) == 0 ||
|
||||
( nKeyOpt != 0 && ( nOpt1 & nKeyOpt) == 0) ||
|
||||
nOptExpDays < GetCurrDay()) {
|
||||
std::string sErr = "Warning on Key (GRC/OPT)" ;
|
||||
LOG_ERROR( GetEGrLogger(), sErr.c_str()) ;
|
||||
return false ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user