EgtMachKernel :

- velocizzata GetEMkVer che rallentava assegnazione della variabile lua con versione della dll (specie in verifica aree protette)
- migliorata verifica extracorse in calcolo assi centri di lavoro.
This commit is contained in:
Dario Sassi
2025-09-30 08:25:27 +02:00
parent 34a26f7d3e
commit 75fa4a3f90
5 changed files with 61 additions and 53 deletions
+12 -10
View File
@@ -31,8 +31,7 @@
const int STR_DIM = 40 ;
//-----------------------------------------------------------------------------
static HINSTANCE s_hModule = NULL ;
static char s_szEMkNameVer[STR_DIM] ;
static HINSTANCE s_hModule = NULL ;
//-----------------------------------------------------------------------------
extern "C" int APIENTRY
@@ -62,21 +61,24 @@ DllMain( HMODULE hModule, DWORD dwReason, LPVOID lpReserved)
const char*
GetEMkVersion( void)
{
std::string sVer ;
GetModuleVersion( s_hModule, sVer) ;
sprintf_s( s_szEMkNameVer, STR_DIM, "%s%s", EMK_STR, sVer.c_str()) ;
static char s_szEMkNameVer[STR_DIM] = "" ;
if ( s_szEMkNameVer[0] == '\0') {
static std::string sVer ;
GetModuleVersion( s_hModule, sVer) ;
sprintf_s( s_szEMkNameVer, STR_DIM, "%s%s", EMK_STR, sVer.c_str()) ;
}
return s_szEMkNameVer ;
}
//-----------------------------------------------------------------------------
std::string
const std::string&
GetEMkVer( void)
{
std::string sVer ;
GetModuleVersion( s_hModule, sVer) ;
return sVer ;
static std::string s_sVer ;
if ( s_sVer.empty())
GetModuleVersion( s_hModule, s_sVer) ;
return s_sVer ;
}
//-----------------------------------------------------------------------------