EgtExecutor 2.4e3 :

- modifiche per prima gestione chiave di rete.
This commit is contained in:
DarioS
2022-05-17 08:21:53 +02:00
parent f57b9859ba
commit aa17b2b080
8 changed files with 77 additions and 10 deletions
+19 -1
View File
@@ -36,6 +36,7 @@ using namespace std ;
static const char* EMK_SETEMKLOGGER = "SetEMkLogger" ;
static const char* EMK_GETEMKVERSION = "GetEMkVersion" ;
static const char* EMK_SETEMKKEY = "SetEMkKey" ;
static const char* EMK_SETEMKNETHWKEY = "SetEMkNetHwKey" ;
static const char* EMK_CREATEMACHMGR = "CreateMachMgr" ;
@@ -44,7 +45,7 @@ HMODULE s_hEMk = nullptr ;
//-----------------------------------------------------------------------------
bool
LoadMachKernelDll( ILogger* pLogger, const string& sKey)
LoadMachKernelDll( ILogger* pLogger, const string& sKey, bool bNetHwKey)
{
// verifico la chiave
if ( ! TestKeyForEMk( sKey, 0, pLogger)) {
@@ -62,6 +63,8 @@ LoadMachKernelDll( ILogger* pLogger, const string& sKey)
MySetEMkLogger( pLogger) ;
// imposto i codici della chiave
MySetEMkKey( sKey) ;
// imposto eventuale chiave di rete
MySetEMkNetHwKey( bNetHwKey) ;
return true ;
}
@@ -130,6 +133,21 @@ MySetEMkKey( const string& sKey)
pFun( sKey) ;
}
//-----------------------------------------------------------------------------
void
MySetEMkNetHwKey( bool bNetHwKey)
{
// verifico caricamento libreria EgtGraphics
if ( s_hEMk == nullptr)
return ;
// recupero funzione che imposta il flag per chiave di rete
typedef void (* PF_SetEMkNetHwKey) ( bool bNetHwKey) ;
PF_SetEMkNetHwKey pFun = (PF_SetEMkNetHwKey)GetProcAddress( s_hEMk, EMK_SETEMKNETHWKEY) ;
if ( pFun == nullptr)
return ;
pFun( bNetHwKey) ;
}
//-----------------------------------------------------------------------------
IMachMgr*
MyCreateMachMgr( void)