KeyGenerator 1.6g8 :

- aggiornamento e modifiche per gestione codici chiavi hardware.
This commit is contained in:
Dario Sassi
2015-07-29 07:11:13 +00:00
parent 12867cc4fb
commit c94137d649
6 changed files with 49 additions and 30 deletions
+6 -6
View File
@@ -263,8 +263,8 @@ CKeyGeneratorDlg::LoadFile( const char* szFile)
sSec += ToString( nLast) ;
string sCust = GetPrivateProfileStringUtf8( sSec.c_str(), "Customer", "", szFile) ;
GetDlgItem( IDC_CUSTOMER)->SetWindowTextW( stringtoW( sCust)) ;
string sMachId = GetPrivateProfileStringUtf8( sSec.c_str(), "MachineId", "", szFile) ;
GetDlgItem( IDC_MACHID)->SetWindowTextW( stringtoW( sMachId)) ;
string sLockId = GetPrivateProfileStringUtf8( sSec.c_str(), "LockId", "", szFile) ;
GetDlgItem( IDC_MACHID)->SetWindowTextW( stringtoW( sLockId)) ;
int nProd = GetPrivateProfileInt( sSec.c_str(), "Product", 0, szFile) ;
((CComboBox*)GetDlgItem( IDC_PROD))->SetCurSel( nProd - 1230) ;
int nVer = GetPrivateProfileInt( sSec.c_str(), "Ver", 0, szFile) ;
@@ -306,12 +306,12 @@ CKeyGeneratorDlg::OnGenerate( void)
WritePrivateProfileStringUtf8( "Licence", "Customer", sCust.c_str(), AfxGetApp()->m_pszProfileName) ;
// recupero l'identificativo macchina (tipo 2)
GetDlgItem( IDC_MACHID)->GetWindowTextW( wszTemp) ;
string sMachId = wstrztoA( wszTemp) ;
if ( ! mKey.SetMachineId( sMachId)) {
AfxMessageBox( L"Id Macchina vuoto o errato") ;
string sLockId = wstrztoA( wszTemp) ;
if ( ! mKey.SetLockId( sLockId)) {
AfxMessageBox( L"Id Serratura vuoto o errato") ;
return ;
}
WritePrivateProfileStringUtf8( "Licence", "MachineId", sMachId.c_str(), AfxGetApp()->m_pszProfileName) ;
WritePrivateProfileStringUtf8( "Licence", "LockId", sLockId.c_str(), AfxGetApp()->m_pszProfileName) ;
// recupero il prodotto
GetDlgItem( IDC_PROD)->GetWindowTextW( wszTemp) ;
string sProd = wstrztoA( wszTemp) ;