EgtInterface 1.6c1 :
- aggiunte funzioni per info su OS, CPU e memoria.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "/EgtDev/Include/EGrDllMain.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EGnPcInfo.h"
|
||||
#include "/EgtDev/Include/EgtLogger.h"
|
||||
#include <fstream>
|
||||
|
||||
@@ -70,6 +71,14 @@ __stdcall EgtInit( int nDebug, const wchar_t* sLogFile, const wchar_t* sLogMsg)
|
||||
LOG_INFO( s_pGenLog, GetEGkVersion())
|
||||
LOG_INFO( s_pGenLog, GetEExVersion())
|
||||
LOG_INFO( s_pGenLog, GetEGrVersion())
|
||||
// Info sul sistema
|
||||
string sTmp ;
|
||||
if ( GetOsInfo( sTmp))
|
||||
LOG_INFO( s_pGenLog, sTmp.c_str())
|
||||
if ( GetCpuInfo( sTmp))
|
||||
LOG_INFO( s_pGenLog, sTmp.c_str())
|
||||
if ( GetMemoryInfo( sTmp))
|
||||
LOG_INFO( s_pGenLog, sTmp.c_str())
|
||||
|
||||
// inizializzo l'interprete LUA
|
||||
LuaInit() ;
|
||||
@@ -224,9 +233,46 @@ EgtGetVersionInfo( string& sVer, const char* szNewLine)
|
||||
sVer += GetENkVersion() ;
|
||||
sVer += szNewLine ;
|
||||
sVer += GetEGnVersion() ;
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetOsInfo( wchar_t*& wsOs)
|
||||
{
|
||||
// recupero le informazioni sul sistema operativo
|
||||
string sOs ;
|
||||
if ( ! GetOsInfo( sOs))
|
||||
return FALSE ;
|
||||
wsOs = _wcsdup( stringtoW( sOs)) ;
|
||||
return (( wsOs == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetCpuInfo( wchar_t*& wsCpu)
|
||||
{
|
||||
// recupero le informazioni sulla Cpu
|
||||
string sCpu ;
|
||||
if ( ! GetCpuInfo( sCpu))
|
||||
return FALSE ;
|
||||
wsCpu = _wcsdup( stringtoW( sCpu)) ;
|
||||
return (( wsCpu == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtGetMemoryInfo( wchar_t*& wsMem)
|
||||
{
|
||||
// recupero le informazioni sulla memoria presente
|
||||
string sMem ;
|
||||
if ( ! GetMemoryInfo( sMem))
|
||||
return FALSE ;
|
||||
wsMem = _wcsdup( stringtoW( sMem)) ;
|
||||
return (( wsMem == nullptr) ? FALSE : TRUE) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
BOOL
|
||||
__stdcall EgtFreeMemory( void* pMem)
|
||||
|
||||
Reference in New Issue
Block a user