6 Commits

Author SHA1 Message Date
Dario Sassi c14ec9a23f KeyGenerator 3.1a2 :
- ricompilazione con cambio versione per modifiche a librerie.
2026-01-13 18:23:05 +01:00
Dario Sassi 7594f23092 KeyGenerator 3.1a1 :
- aggiunta gestione versione 31.
2026-01-02 12:35:49 +01:00
Dario Sassi 34d8014904 KeyGenerator 2.7a1 :
- ricompilazione per nuovo anno e con VS C++ 2022.
2025-01-13 16:10:35 +01:00
Dario Sassi 8beb113de9 KeyGenerator 2.6j1 :
- aggiunta gestione Effector.
2024-10-05 13:13:15 +02:00
Dario Sassi a87f87ade6 KeyGenerator 2.6i1 :
- Opt2 portato da 24 a 32 bit.
2024-09-20 12:41:22 +02:00
Dario Sassi 52cde6d275 KeyGenerator 2.6a1 :
- aggiornamento per versione 26.
2024-01-16 10:36:17 +01:00
6 changed files with 27 additions and 20 deletions
+3 -3
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2013-2023 // EgalTech 2013-2025
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : KeyGenerator.cpp Data : 02.01.23 Versione : 2.5a1 // File : KeyGenerator.cpp Data : 02.01.26 Versione : 3.1a1
// Contenuto : Implementazione della classe applicazione generatore chiavi. // Contenuto : Implementazione della classe applicazione generatore chiavi.
// //
// //
@@ -85,7 +85,7 @@ CKeyGeneratorApp::InitInstance( void)
// verifico la protezione // verifico la protezione
SetLockType( KEY_LOCK_TYPE_HW) ; SetLockType( KEY_LOCK_TYPE_HW) ;
string sKey = GetPrivateProfileStringUtf8( "General", "Key", "", m_pszProfileName) ; string sKey = GetPrivateProfileStringUtf8( "General", "Key", "", m_pszProfileName) ;
if ( VerifyKey( sKey, 823, 2312, 10) != KEY_OK) { if ( VerifyKey( sKey, 823, 3101, 10) != KEY_OK) {
m_nExitCode = 1 ; m_nExitCode = 1 ;
return FALSE ; return FALSE ;
} }
BIN
View File
Binary file not shown.
+5 -3
View File
@@ -14,7 +14,7 @@
<ProjectGuid>{0516D641-6731-48BE-AC94-C9E957D371B6}</ProjectGuid> <ProjectGuid>{0516D641-6731-48BE-AC94-C9E957D371B6}</ProjectGuid>
<RootNamespace>KeyGenerator</RootNamespace> <RootNamespace>KeyGenerator</RootNamespace>
<Keyword>MFCProj</Keyword> <Keyword>MFCProj</Keyword>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
@@ -22,7 +22,7 @@
<UseDebugLibraries>true</UseDebugLibraries> <UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc> <UseOfMfc>Dynamic</UseOfMfc>
<PlatformToolset>v141_xp</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
@@ -30,7 +30,7 @@
<WholeProgramOptimization>true</WholeProgramOptimization> <WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet> <CharacterSet>Unicode</CharacterSet>
<UseOfMfc>Dynamic</UseOfMfc> <UseOfMfc>Dynamic</UseOfMfc>
<PlatformToolset>v141_xp</PlatformToolset> <PlatformToolset>v143</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@@ -63,6 +63,7 @@
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
@@ -94,6 +95,7 @@
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile> </ClCompile>
<Link> <Link>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
+17 -9
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2013-2024 // EgalTech 2013-2026
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : KeyGeneratorDlg.cpp Data : 05.01.24 Versione : 2.5l6 // File : KeyGeneratorDlg.cpp Data : 02.01.26 Versione : 3.1a1
// Contenuto : Implementazione della classe dialogo generatore chiavi. // Contenuto : Implementazione della classe dialogo generatore chiavi.
// //
// //
@@ -13,6 +13,9 @@
// 23.05.23 DS Aggiunto EgtEngine. // 23.05.23 DS Aggiunto EgtEngine.
// 09.10.23 DS Aggiunta gestione chiave di rete con LockId contenente AddrPort dopo @. // 09.10.23 DS Aggiunta gestione chiave di rete con LockId contenente AddrPort dopo @.
// 05.01.24 DS Aggiunta versione 26. // 05.01.24 DS Aggiunta versione 26.
// 05.10.24 DS Aggiunto Effector.
// 13.01.25 DS Aggiunta versione 27.
// 02.01.26 DS Aggiunta versione 31.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -44,11 +47,12 @@ static const vector<string> vsProd = {
"3279", // EgtCAM5 "3279", // EgtCAM5
"5327", // EgtBeamWall "5327", // EgtBeamWall
"5583", // Icarus "5583", // Icarus
"7375", // Effector
"9423", // OmagCUT "9423", // OmagCUT
"9935" // EgtEngine "9935" // EgtEngine
} ; // altri valori : 463, 719, 975, 1487, 2255, 2511, 3535, 4559, 9679 (max 9999 e deve contenere i bit di 207) } ; // altri valori : 463, 719, 975, 1487, 2255, 2511, 3535, 4559, 9679 (max 9999 e deve contenere i bit di 207)
static const vector<string> vsVer = { static const vector<string> vsVer = {
"26", "25", "24", "23", "22", "21", "19", "18", "16", "15" "31", "27", "26", "25", "24", "23", "22", "21", "19", "18", "16", "15"
} ; } ;
static const vector<string> vsSubVer = { static const vector<string> vsSubVer = {
"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "" "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", ""
@@ -340,8 +344,10 @@ CKeyGeneratorDlg::LoadFile( const char* szFile)
int nLev = GetPrivateProfileInt( sSec.c_str(), "Lev", 0, szFile) ; int nLev = GetPrivateProfileInt( sSec.c_str(), "Lev", 0, szFile) ;
((CComboBox*)GetDlgItem( IDC_LEV))->SetCurSel( nLev - 1) ; ((CComboBox*)GetDlgItem( IDC_LEV))->SetCurSel( nLev - 1) ;
int nExpTime = GetPrivateProfileInt( sSec.c_str(), "ExpDays", 0, szFile) ; int nExpTime = GetPrivateProfileInt( sSec.c_str(), "ExpDays", 0, szFile) ;
if ( nExpTime != 0) if ( nExpTime != 0) {
((CDateTimeCtrl*)GetDlgItem( IDC_EXPIRATION))->SetTime( &CTime( unsigned( nExpTime) * 24 * 3600)) ; CTime time( unsigned( nExpTime) * 24 * 3600) ;
((CDateTimeCtrl*)GetDlgItem( IDC_EXPIRATION))->SetTime( &time) ;
}
int nOpt1 = GetPrivateProfileInt( sSec.c_str(), "Opt1", 0, szFile) ; int nOpt1 = GetPrivateProfileInt( sSec.c_str(), "Opt1", 0, szFile) ;
for ( int i = IDC_CHECK01, j = 0 ; i <= IDC_CHECK16 ; ++ i, ++ j) { for ( int i = IDC_CHECK01, j = 0 ; i <= IDC_CHECK16 ; ++ i, ++ j) {
if ( ( nOpt1 & ( 1 << j)) != 0) if ( ( nOpt1 & ( 1 << j)) != 0)
@@ -350,7 +356,7 @@ CKeyGeneratorDlg::LoadFile( const char* szFile)
((CButton*)GetDlgItem( i))->SetCheck( BST_UNCHECKED) ; ((CButton*)GetDlgItem( i))->SetCheck( BST_UNCHECKED) ;
} }
int nOpt2 = GetPrivateProfileInt( sSec.c_str(), "Opt2", 0, szFile) ; int nOpt2 = GetPrivateProfileInt( sSec.c_str(), "Opt2", 0, szFile) ;
for ( int i = IDC_CHECK2_01, j = 0 ; i <= IDC_CHECK2_24 ; ++ i, ++ j) { for ( int i = IDC_CHECK2_01, j = 0 ; i <= IDC_CHECK2_32 ; ++ i, ++ j) {
if ( ( nOpt2 & ( 1 << j)) != 0) if ( ( nOpt2 & ( 1 << j)) != 0)
((CButton*)GetDlgItem( i))->SetCheck( BST_CHECKED) ; ((CButton*)GetDlgItem( i))->SetCheck( BST_CHECKED) ;
else else
@@ -358,8 +364,10 @@ CKeyGeneratorDlg::LoadFile( const char* szFile)
} }
// check non ancora inseriti nel dialogo // check non ancora inseriti nel dialogo
int nOptExpTime = GetPrivateProfileInt( sSec.c_str(), "OptExpDays", 0, szFile) ; int nOptExpTime = GetPrivateProfileInt( sSec.c_str(), "OptExpDays", 0, szFile) ;
if ( nOptExpTime != 0) if ( nOptExpTime != 0) {
((CDateTimeCtrl*)GetDlgItem( IDC_OPT_EXPIR))->SetTime( &CTime( unsigned( nOptExpTime) * 24 * 3600)) ; CTime time( unsigned( nOptExpTime) * 24 * 3600) ;
((CDateTimeCtrl*)GetDlgItem( IDC_OPT_EXPIR))->SetTime( &time) ;
}
return true ; return true ;
} }
@@ -432,7 +440,7 @@ CKeyGeneratorDlg::OnGenerate( void)
nOpt1 += ( 1 << j) ; nOpt1 += ( 1 << j) ;
} }
unsigned int nOpt2 = 0 ; unsigned int nOpt2 = 0 ;
for ( int i = IDC_CHECK2_01, j = 0 ; i <= IDC_CHECK2_24 ; ++ i, ++ j) { for ( int i = IDC_CHECK2_01, j = 0 ; i <= IDC_CHECK2_32 ; ++ i, ++ j) {
if ( ((CButton*)GetDlgItem( i))->GetCheck() == BST_CHECKED) if ( ((CButton*)GetDlgItem( i))->GetCheck() == BST_CHECKED)
nOpt2 += ( 1 << j) ; nOpt2 += ( 1 << j) ;
} }
BIN
View File
Binary file not shown.
+2 -5
View File
@@ -13,6 +13,8 @@
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#endif #endif
#define NOMINMAX
#include "/EgtDev/Include/EgtTargetVer.h" #include "/EgtDev/Include/EgtTargetVer.h"
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
@@ -23,11 +25,8 @@
#include <afxwin.h> // MFC core and standard components #include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions #include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes #include <afxdisp.h> // MFC Automation classes
#ifndef _AFX_NO_OLE_SUPPORT #ifndef _AFX_NO_OLE_SUPPORT
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls #include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#endif #endif
@@ -37,12 +36,10 @@
#include <afxcontrolbars.h> // MFC support for ribbons and control bars #include <afxcontrolbars.h> // MFC support for ribbons and control bars
#include "/EgtDev/Include/EgtLibVer.h" #include "/EgtDev/Include/EgtLibVer.h"
#pragma comment(lib, EGTLIBDIR "EgtGeneral" EGTLIBVER ".lib") #pragma comment(lib, EGTLIBDIR "EgtGeneral" EGTLIBVER ".lib")
#pragma comment(lib, EGTLIBDIR "SEgtLock" EGTLIBVER ".lib") #pragma comment(lib, EGTLIBDIR "SEgtLock" EGTLIBVER ".lib")
#ifdef _UNICODE #ifdef _UNICODE
#if defined _M_IX86 #if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")