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
+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) ;
}