EgtLock 2.1e1 :
- aggiunte funzioni per leggere SN delle chiavi hardware.
This commit is contained in:
+21
@@ -15,6 +15,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "MachineId.h"
|
||||
#include "DongleId.h"
|
||||
#include "DongleSN.h"
|
||||
#include "Obfuscate.h"
|
||||
#include "/EgtDev/Include/EgtBase64.h"
|
||||
#include "/EgtDev/Include/EgtCrc32.h"
|
||||
@@ -131,3 +132,23 @@ ConvertLockId2ToScramKey( const string& sLockId2, string& sScramKey)
|
||||
AddCrc32ToString( sScramKey) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GetLockSN( int& nLockSN)
|
||||
{
|
||||
switch ( s_nLockType) {
|
||||
default : // KEY_LOCK_TYPE_ANY
|
||||
if ( GetDongleSN( nLockSN))
|
||||
return true ;
|
||||
else {
|
||||
nLockSN = 0 ;
|
||||
return false ;
|
||||
}
|
||||
case KEY_LOCK_TYPE_SW :
|
||||
nLockSN = 0 ;
|
||||
return false ;
|
||||
case KEY_LOCK_TYPE_HW :
|
||||
return GetDongleSN( nLockSN) ;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user