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* EGR_SETEGRLOGGER = "SetEGrLogger" ;
static const char* EGR_GETEGRVERSION = "GetEGrVersion" ;
static const char* EGR_SETEGRKEY = "SetEGrKey" ;
static const char* EGR_SETEGRNETHWKEY = "SetEGrNetHwKey" ;
static const char* EGR_CREATEEGRSCENE = "CreateEGrScene" ;
static const char* EGR_CREATESCEEXECUTOR = "CreateSceExecutor" ;
static const char* EGR_CREATEEGRIMAGEMGR = "CreateEgrImageMgr" ;
@@ -46,7 +47,7 @@ HMODULE s_hEGr = nullptr ;
//-----------------------------------------------------------------------------
bool
LoadGraphicsDll( ILogger* pLogger, const string& sKey)
LoadGraphicsDll( ILogger* pLogger, const string& sKey, bool bNetHwKey)
{
// verifico la chiave
if ( ! TestKeyForEGr( sKey, 0, pLogger)) {
@@ -64,6 +65,8 @@ LoadGraphicsDll( ILogger* pLogger, const string& sKey)
MySetEGrLogger( pLogger) ;
// imposto i codici della chiave
MySetEGrKey( sKey) ;
// imposto eventuale chiave di rete
MySetEGrNetHwKey( bNetHwKey) ;
return true ;
}
@@ -132,6 +135,21 @@ MySetEGrKey( const string& sKey)
pFun( sKey) ;
}
//-----------------------------------------------------------------------------
void
MySetEGrNetHwKey( bool bNetHwKey)
{
// verifico caricamento libreria EgtGraphics
if ( s_hEGr == nullptr)
return ;
// recupero funzione che imposta il flag per chiave di rete
typedef void (* PF_SetEGrNetHwKey) ( bool bNetHwKey) ;
PF_SetEGrNetHwKey pFun = (PF_SetEGrNetHwKey)GetProcAddress( s_hEGr, EGR_SETEGRNETHWKEY) ;
if ( pFun == nullptr)
return ;
pFun( bNetHwKey) ;
}
//-----------------------------------------------------------------------------
IEGrScene*
MyCreateEGrScene( void)