EgtLock 2.4e3 :
- modifiche per prima versione chiave di rete.
This commit is contained in:
+28
-11
@@ -1,13 +1,13 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
// EgalTech 2015-2022
|
||||
//----------------------------------------------------------------------------
|
||||
// File : ProtectionId.cpp Data : 28.07.15 Versione : 1.6g8
|
||||
// File : ProtectionId.cpp Data : 16.05.22 Versione : 2.4e3
|
||||
// Contenuto : Funzioni per gestione/calcolo Id protezione.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 28.07.15 DS Creazione modulo.
|
||||
//
|
||||
// 16.05.22 DS Aggiunta gestione chiave di rete.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "MachineId.h"
|
||||
#include "DongleId.h"
|
||||
#include "NetDongleId.h"
|
||||
#include "DongleSN.h"
|
||||
#include "Obfuscate.h"
|
||||
#include "/EgtDev/Include/EgtBase64.h"
|
||||
@@ -24,7 +25,8 @@
|
||||
using namespace std ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int s_nLockType = KEY_LOCK_TYPE_ANY ;
|
||||
static int s_nLockType = KEY_LOCK_TYPE_ANY ;
|
||||
static bool s_bNetHwKey = false ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
@@ -39,10 +41,11 @@ SetLockType( int nType)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
GetLockType( void)
|
||||
bool
|
||||
SetNetHwKey( bool bNetHwKey)
|
||||
{
|
||||
return s_nLockType ;
|
||||
s_bNetHwKey = bNetHwKey ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -50,14 +53,28 @@ bool
|
||||
GetLockId( string& sLockId)
|
||||
{
|
||||
switch ( s_nLockType) {
|
||||
default : // KEY_LOCK_TYPE_ANY
|
||||
if ( GetDongleId( sLockId))
|
||||
return true ;
|
||||
default : // KEY_LOCK_TYPE_ANY
|
||||
if ( ! s_bNetHwKey) {
|
||||
if ( GetDongleId( sLockId))
|
||||
return true ;
|
||||
}
|
||||
else {
|
||||
if ( GetNetDongleId( sLockId))
|
||||
return true ;
|
||||
}
|
||||
return GetMachineId( sLockId) ;
|
||||
case KEY_LOCK_TYPE_SW :
|
||||
return GetMachineId( sLockId) ;
|
||||
case KEY_LOCK_TYPE_HW :
|
||||
return GetDongleId( sLockId) ;
|
||||
if ( ! s_bNetHwKey) {
|
||||
if ( GetDongleId( sLockId))
|
||||
return true ;
|
||||
}
|
||||
else {
|
||||
if ( GetNetDongleId( sLockId))
|
||||
return true ;
|
||||
}
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user