EgtGeomKernel 1.5i3 :

- aggiunto controllo chiave di protezione.
This commit is contained in:
Dario Sassi
2014-09-15 07:04:25 +00:00
parent f65e878683
commit ffd9f0c1bd
5 changed files with 29 additions and 0 deletions
+2
View File
@@ -15,6 +15,8 @@
#include "/EgtDev/Include/EgtILogger.h"
#include <string>
//-----------------------------------------------------------------------------
ILogger* GetEGkLogger( void) ;
const std::string& GetEGkKey( void) ;
+17
View File
@@ -91,6 +91,23 @@ GetEGkLogger( void)
return s_pLogger ;
}
//-----------------------------------------------------------------------------
static std::string s_sKey ;
//-----------------------------------------------------------------------------
void
SetEGkKey( const std::string& sKey)
{
s_sKey = sKey ;
}
//-----------------------------------------------------------------------------
const std::string&
GetEGkKey( void)
{
return s_sKey ;
}
//-----------------------------------------------------------------------------
void
InitFontManager( const std::string& sNfeFontDir, const std::string& sDefaultFont)
BIN
View File
Binary file not shown.
+9
View File
@@ -23,6 +23,7 @@
#include "/EgtDev/Include/EGkStringUtils3d.h"
#include "/EgtDev/Include/EgnStringConverter.h"
#include "/EgtDev/Include/EgtPointerOwner.h"
#include "/EgtDev/Include/SELkKeyProc.h"
#include <new>
using namespace std ;
@@ -31,6 +32,14 @@ using namespace std ;
IGeomDB*
CreateGeomDB( void)
{
// verifico la chiave
int nRet = VerifyKey( GetEGkKey(), 1231, 15, 1) ;
if ( nRet != KEY_OK) {
string sErr = "Error on Key (" + ToString( nRet) + ")" ;
LOG_ERROR( GetEGkLogger(), sErr.c_str()) ;
return nullptr ;
}
// creo il GeomDB
return static_cast<IGeomDB*> ( new(nothrow) GeomDB) ;
}
+1
View File
@@ -31,3 +31,4 @@
#pragma comment(lib, EGTEXTDIR "zlib/lib/zlib" EGTLIBVER ".lib")
#pragma comment(lib, EGTLIBDIR "EgtGeneral" EGTLIBVER ".lib")
#pragma comment(lib, EGTLIBDIR "EgtNumKernel" EGTLIBVER ".lib")
#pragma comment(lib, EGTLIBDIR "SEgtLock" EGTLIBVER ".lib")