EgtExecutor :
- modifiche per caricare le dll opzionali solo se codici chiave le abilitano.
This commit is contained in:
+15
-2
@@ -13,7 +13,9 @@
|
||||
|
||||
//--------------------------- Include ----------------------------------------
|
||||
#include "stdafx.h"
|
||||
#include "EXE.h"
|
||||
#include "DllMachKernel.h"
|
||||
#include "/EgtDev/Include/EMkDllMain.h"
|
||||
#define NOMINMAX
|
||||
#include <windows.h>
|
||||
|
||||
@@ -42,14 +44,25 @@ HMODULE s_hEMk = nullptr ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
LoadMachKernelDll( void)
|
||||
LoadMachKernelDll( ILogger* pLogger, const string& sKey)
|
||||
{
|
||||
// verifico la chiave
|
||||
if ( ! TestKeyForEMk( sKey, 0, pLogger)) {
|
||||
FreeMachKernelDll() ;
|
||||
return false ;
|
||||
}
|
||||
// se già caricata
|
||||
if ( s_hEMk != nullptr)
|
||||
return true ;
|
||||
// carico la libreria EgtMachKernel
|
||||
s_hEMk = LoadLibrary( EMK_NAME) ;
|
||||
return ( s_hEMk != nullptr) ;
|
||||
if ( s_hEMk == nullptr)
|
||||
return false ;
|
||||
// imposto logger
|
||||
MySetEMkLogger( pLogger) ;
|
||||
// imposto i codici della chiave
|
||||
MySetEMkKey( sKey) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user