diff --git a/API_General.cpp b/API_General.cpp index 8eb8608..80956d7 100644 --- a/API_General.cpp +++ b/API_General.cpp @@ -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 @@ -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) diff --git a/EgtInterface.rc b/EgtInterface.rc index 409793a..ab825b7 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ