EgtLock :
- aggiunta in interfaccia funzione CloseNetHwKey.
This commit is contained in:
+17
-3
@@ -1,13 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2022
|
||||
// EgalTech 2015-2023
|
||||
//----------------------------------------------------------------------------
|
||||
// File : ProtectionId.cpp Data : 16.05.22 Versione : 2.4e3
|
||||
// File : ProtectionId.cpp Data : 30.05.23 Versione : 2.5e5
|
||||
// Contenuto : Funzioni per gestione/calcolo Id protezione.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 28.07.15 DS Creazione modulo.
|
||||
// 16.05.22 DS Aggiunta gestione chiave di rete.
|
||||
// 30.05.23 DS Aggiunta gestione utente di rete.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -20,6 +21,7 @@
|
||||
#include "Obfuscate.h"
|
||||
#include "/EgtDev/Include/EgtBase64.h"
|
||||
#include "/EgtDev/Include/EgtCrc32.h"
|
||||
#include "/EgtDev/Include/EgtNumUtils.h"
|
||||
#include "/EgtDev/Include/SELkLockId.h"
|
||||
|
||||
using namespace std ;
|
||||
@@ -27,6 +29,7 @@ using namespace std ;
|
||||
//----------------------------------------------------------------------------
|
||||
static int s_nLockType = KEY_LOCK_TYPE_ANY ;
|
||||
static bool s_bNetHwKey = false ;
|
||||
static int s_nNetUserId = 0 ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
@@ -42,12 +45,23 @@ SetLockType( int nType)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SetNetHwKey( bool bNetHwKey)
|
||||
SetNetHwKey( bool bNetHwKey, int nUserId)
|
||||
{
|
||||
s_bNetHwKey = bNetHwKey ;
|
||||
if ( s_bNetHwKey) {
|
||||
s_nLockType = KEY_LOCK_TYPE_HW ;
|
||||
s_nNetUserId = Clamp( nUserId, 0, 9) ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
CloseNetHwKey( void)
|
||||
{
|
||||
return NetDongleClose() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GetLockId( string& sLockId)
|
||||
|
||||
+1
-2
@@ -107,8 +107,7 @@ NetDongleConnect( void)
|
||||
}
|
||||
// cerco la chiave Xlight virtuale dell'utente anonimo
|
||||
int nStatusDC = 0 ;
|
||||
s_dev_ctx = xnd_xlt_devctx_xnodus_create2( s_env, s_net_data, xnodus_key_blob, nullptr, 0,
|
||||
XND_XLT_DEVCTX_FLAG_XNODUS_AUTO_REOPEN_SESSION | XND_XLT_DEVCTX_FLAG_XNODUS_MULTI_INSTANCE, 0, &nStatusDC) ;
|
||||
s_dev_ctx = xnd_xlt_devctx_xnodus_create2( s_env, s_net_data, xnodus_key_blob, nullptr, 0, XND_XLT_DEVCTX_FLAG_XNODUS_MULTI_INSTANCE, 0, &nStatusDC) ;
|
||||
if ( s_dev_ctx == nullptr) {
|
||||
xnd_xlt_env_release( s_env) ;
|
||||
s_env = nullptr ;
|
||||
|
||||
Reference in New Issue
Block a user