From b3d649894f98ca052fe206354c7c8b4a5cf046fb Mon Sep 17 00:00:00 2001 From: DarioS Date: Tue, 30 May 2023 10:22:05 +0200 Subject: [PATCH 1/4] Include : - aggiornamenti per migliore gestione delle chiavi di rete. --- EGkDllMain.h | 2 +- EGnDllMain.h | 6 ++++++ EGnGetKeyData.h | 33 +++++++++++++++++++++++++++++++++ SELkKeyProc.h | 1 + 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 EGnGetKeyData.h diff --git a/EGkDllMain.h b/EGkDllMain.h index 75d321a..aa225df 100644 --- a/EGkDllMain.h +++ b/EGkDllMain.h @@ -47,4 +47,4 @@ EGK_EXPORT const std::string& GetNfeFontDir( void) ; // restituisce il nome del font di default EGK_EXPORT const std::string& GetDefaultFont( void) ; // imposto il gestore eventi -EGK_EXPORT bool SetEGkProcessEvents( pfProcEvents pFun) ; \ No newline at end of file +EGK_EXPORT bool SetEGkProcessEvents( pfProcEvents pFun) ; diff --git a/EGnDllMain.h b/EGnDllMain.h index 1e98e3c..72b9619 100644 --- a/EGnDllMain.h +++ b/EGnDllMain.h @@ -28,3 +28,9 @@ class ILogger ; EGN_EXPORT const char* GetEGnVersion( void) ; // permette di impostare il logger per la Dll EGN_EXPORT void SetEGnLogger( ILogger* pLogger) ; +// imposta la chiave di protezione +EGN_EXPORT void SetEGnKey( const std::string& sKey) ; +// imposta il tipo di chiave di protezione +EGN_EXPORT void SetEGnKeyType( int nType) ; +// imposta se chiave hardware di rete +EGN_EXPORT void SetEGnNetHwKey( bool bNetHwKey) ; diff --git a/EGnGetKeyData.h b/EGnGetKeyData.h new file mode 100644 index 0000000..66c9b73 --- /dev/null +++ b/EGnGetKeyData.h @@ -0,0 +1,33 @@ +//---------------------------------------------------------------------------- +// EgalTech 2023-2023 +//---------------------------------------------------------------------------- +// File : EGnGetKeyData.h Data : 29.05.23 Versione : 2.5e3 +// Contenuto : Prototipo funzioni gestione dati chiavi di protezione. +// +// +// +// Modifiche : 29.05.23 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#define NOMINMAX +#include +#include + + +//----------------------- Macro per import/export ---------------------------- +#undef EGN_EXPORT +#if defined( I_AM_EGN) // da definirsi solo nella DLL + #define EGN_EXPORT __declspec( dllexport) +#else + #define EGN_EXPORT __declspec( dllimport) +#endif + +//----------------------------------------------------------------------------- +EGN_EXPORT bool SetEGnKeyLevel( int nRet, int nKeyLev, int nKeyExpDays) ; +EGN_EXPORT int GetEGnKeyLevel( int nProd, int nVer, int nLev, int& nKeyLev, int& nKeyExpDays) ; +EGN_EXPORT bool SetEGnKeyOptions( int nRet, int nKeyOpt1, int nKeyOpt2, int nKeyOptExpDays) ; +EGN_EXPORT int GetEGnKeyOptions( int nProd, int nVer, int nLev, unsigned int& nKeyOpt1, unsigned int& nKeyOpt2, int& nKeyOptExpDays) ; diff --git a/SELkKeyProc.h b/SELkKeyProc.h index 325be83..8a74a06 100644 --- a/SELkKeyProc.h +++ b/SELkKeyProc.h @@ -28,6 +28,7 @@ int GetKeyLevel( const std::string& sKey, int nProd, int nVer, int nLev, int GetKeyOptions( const std::string& sKey, int nProd, int nVer, int nLev, unsigned int& nKOpt1, unsigned int& nKOpt2, int& nKOptExpDays) ; int GetCurrDay( void) ; +int GetMinDay( void) ; //-------------------------- Constants ---------------------------------------- // Codici di ritorno From 6f0c5324561f04a94e504c533d37f35217a838d3 Mon Sep 17 00:00:00 2001 From: DarioS Date: Tue, 30 May 2023 17:06:21 +0200 Subject: [PATCH 2/4] Include : - aggiornamento prototipi. --- EInAPI.h | 1 + EXeExecutor.h | 3 ++- SELkLockId.h | 13 ++++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/EInAPI.h b/EInAPI.h index ad21143..10b24fb 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -50,6 +50,7 @@ EIN_EXPORT void __stdcall EgtDisableCommandLogger( void) ; EIN_EXPORT BOOL __stdcall EgtGetVersionInfo( wchar_t*& wsVer) ; EIN_EXPORT BOOL __stdcall EgtGetKeyInfo( wchar_t*& wsKey) ; EIN_EXPORT BOOL __stdcall EgtSetLockType( int nType) ; +EIN_EXPORT BOOL __stdcall EgtSetLockId( const wchar_t* wsLockId) ; EIN_EXPORT BOOL __stdcall EgtSetNetHwKey( BOOL bNetHwKey) ; EIN_EXPORT BOOL __stdcall EgtGetKeyLevel( int nProd, int nVer, int nLev, int* pnKLev) ; EIN_EXPORT BOOL __stdcall EgtGetKeyOptions( int nProd, int nVer, int nLev, unsigned int* pnOpt2) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 3246be2..b15a8ff 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -55,7 +55,8 @@ EXE_EXPORT bool ExeGetExecutableVersion( std::string& sVer) ; EXE_EXPORT bool ExeGetVersionInfo( std::string& sVer, const char* szNewLine) ; EXE_EXPORT bool ExeGetKeyInfo( std::string& sKey) ; EXE_EXPORT bool ExeSetLockType( int nType) ; -EXE_EXPORT bool ExeSetNetHwKey( bool bNetHwKey) ; +EXE_EXPORT bool ExeSetLockId( std::string sLockId) ; +EXE_EXPORT bool ExeSetNetHwKey( bool bNetHwKey, int nUserId = 0) ; EXE_EXPORT bool ExeGetKeyLevel( int nProd, int nVer, int nLev, int& nKLev) ; EXE_EXPORT bool ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& nOpt2) ; EXE_EXPORT bool ExeGetKeyLeftDays( int& nLeftDays) ; diff --git a/SELkLockId.h b/SELkLockId.h index d0111c4..4758594 100644 --- a/SELkLockId.h +++ b/SELkLockId.h @@ -1,13 +1,14 @@ //---------------------------------------------------------------------------- -// EgalTech 2014-2022 +// EgalTech 2014-2023 //---------------------------------------------------------------------------- -// File : SELkLockId.cpp Data : 16.05.22 Versione : 2.4e3 +// File : SELkLockId.cpp Data : 30.05.23 Versione : 2.5e5 // Contenuto : Dichiarazione funzioni per gestione/calcolo Id protezione, // da macchina o da chiave hardware. // // // Modifiche : 10.09.14 DS Creazione modulo. // 16.05.22 DS Aggiunta gestione chiave di rete. +// 30.05.23 DS Aggiunta gestione utente di rete e rilascio chiave di rete. // //---------------------------------------------------------------------------- @@ -16,10 +17,12 @@ #include //------------------------------------------------------------------------------- -// Imposto il tipo di protezione +// Imposto il tipo di protezione ammessa (ANY, HW, SW) bool SetLockType( int nType) ; -// Forzo chiave di rete (se prevista protezione hardware) -bool SetNetHwKey( bool bNetHwKey) ; +// Imposto chiave di rete e identificativo utente (0-9) +bool SetNetHwKey( bool bNetHwKey, int nUserId) ; +// Libero chiave di rete (da eseguire al termine del programma) +bool CloseNetHwKey( void) ; // Recupero l'identificativo in chiaro della protezione bool GetLockId( std::string& sLockId) ; // Recupero l'identificativo cifrato della protezione From 129dfa412ef2cbee0dec696ca90a027cb9f71939 Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 5 Jun 2023 08:05:31 +0200 Subject: [PATCH 3/4] Include : - aggiornamento prototipi - aggiornamento codici mensili di protezione. --- EGnGetKeyData.h | 2 ++ EXeExecutor.h | 2 +- EgtKeyCodes.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/EGnGetKeyData.h b/EGnGetKeyData.h index 66c9b73..6b050bd 100644 --- a/EGnGetKeyData.h +++ b/EGnGetKeyData.h @@ -31,3 +31,5 @@ EGN_EXPORT bool SetEGnKeyLevel( int nRet, int nKeyLev, int nKeyExpDays) ; EGN_EXPORT int GetEGnKeyLevel( int nProd, int nVer, int nLev, int& nKeyLev, int& nKeyExpDays) ; EGN_EXPORT bool SetEGnKeyOptions( int nRet, int nKeyOpt1, int nKeyOpt2, int nKeyOptExpDays) ; EGN_EXPORT int GetEGnKeyOptions( int nProd, int nVer, int nLev, unsigned int& nKeyOpt1, unsigned int& nKeyOpt2, int& nKeyOptExpDays) ; +// Interpretazione della stringa di LockId +EGN_EXPORT bool GetLockIdStringInfo( const std::string& sLockId, int& nKeyType, bool& bNetKey, int& nUserId) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index b15a8ff..c88c7a0 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -55,7 +55,7 @@ EXE_EXPORT bool ExeGetExecutableVersion( std::string& sVer) ; EXE_EXPORT bool ExeGetVersionInfo( std::string& sVer, const char* szNewLine) ; EXE_EXPORT bool ExeGetKeyInfo( std::string& sKey) ; EXE_EXPORT bool ExeSetLockType( int nType) ; -EXE_EXPORT bool ExeSetLockId( std::string sLockId) ; +EXE_EXPORT bool ExeSetLockId( const std::string& sLockId) ; EXE_EXPORT bool ExeSetNetHwKey( bool bNetHwKey, int nUserId = 0) ; EXE_EXPORT bool ExeGetKeyLevel( int nProd, int nVer, int nLev, int& nKLev) ; EXE_EXPORT bool ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& nOpt2) ; diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index 924176b..5184ef5 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -24,7 +24,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2505 ; +const int KEY_BASELIB_VER = 2506 ; const int KEY_BASELIB_LEV = 1 ; //---------------------------------------------------------------------------- From 328f571012e6d0e31e945aa503b07a4b75b10116 Mon Sep 17 00:00:00 2001 From: DarioS Date: Mon, 19 Jun 2023 08:00:20 +0200 Subject: [PATCH 4/4] Include : - aggiornamento prototipi - aggiunta costante per verifica collisione in simulazione con poliedri. --- EGkCDeClosedSurfTmClosedSurfTm.h | 6 +++--- EMkSimuGenConst.h | 3 ++- EXeExecutor.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/EGkCDeClosedSurfTmClosedSurfTm.h b/EGkCDeClosedSurfTmClosedSurfTm.h index 011d3f6..f84a1fe 100644 --- a/EGkCDeClosedSurfTmClosedSurfTm.h +++ b/EGkCDeClosedSurfTmClosedSurfTm.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2020-2020 +// EgalTech 2020-2023 //---------------------------------------------------------------------------- -// File : EGkCDeSurfTmSurfTm.h Data : 13.11.20 Versione : +// File : EGkCDeClosedSurfTmClosedSurfTm.h Data : 14.06.23 Versione : 2.5f3 // Contenuto : Dichiarazione funzione verifica collisione tra // SurfTm e SurfTm. // @@ -27,4 +27,4 @@ // di collisione o inconsistenza dei parametri di input. // Le due superfici devono essere espresse nel medesimo sistema di riferimento. // La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL. -EGK_EXPORT bool CDeClosedSurfTmClosedSurfTm( const SurfTriMesh& SurfA, const SurfTriMesh& SurfB, double dSafeDist) ; \ No newline at end of file +EGK_EXPORT bool CDeClosedSurfTmClosedSurfTm( const ISurfTriMesh& SurfA, const ISurfTriMesh& SurfB, double dSafeDist) ; diff --git a/EMkSimuGenConst.h b/EMkSimuGenConst.h index 049acbd..50fe8c3 100644 --- a/EMkSimuGenConst.h +++ b/EMkSimuGenConst.h @@ -35,7 +35,8 @@ enum SimCollObjType { MCH_SIM_COB_NULL = 0, MCH_SIM_COB_BOX = 1, MCH_SIM_COB_CYL = 2, MCH_SIM_COB_SPHE = 3, - MCH_SIM_COB_CONE = 4} ; + MCH_SIM_COB_CONE = 4, + MCH_SIM_COB_POLY = 101} ; //------------------------ Stato di visualizzazione della macchina ------------ enum MachLook { MCH_LOOK_NONE = -1, diff --git a/EXeExecutor.h b/EXeExecutor.h index c88c7a0..d82c2f4 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -792,6 +792,7 @@ EXE_EXPORT int ExeCDeRectPrismoidSolid( const Frame3d& frPrismoid, double dBase EXE_EXPORT int ExeCDeCylSolid( const Frame3d& frCyl, double dR, double dH, int nSolidId, double dSafeDist, int nRefType) ; EXE_EXPORT int ExeCDeConeSolid( const Frame3d& frCone, double dR1, double dR2, double dH, int nSolidId, double dSafeDist, int nRefType) ; EXE_EXPORT int ExeCDeSpheSolid( const Point3d& ptCen, double dR, int nSolidId, double dSafeDist, int nRefType) ; +EXE_EXPORT int ExeCDeSolidSolid( int nSolid1Id, int nSolid2Id, double dSafeDist) ; // Maximum Filler EXE_EXPORT bool ExeMaxFillerStart( void) ;