//---------------------------------------------------------------------------- // EgalTech 2014-2014 //---------------------------------------------------------------------------- // File : API_LUA.cpp Data : 28.09.14 Versione : 1.5i5 // Contenuto : Funzioni esecuzione LUA per API. // // // // Modifiche : 28.09.14 DS Creazione modulo. // // //---------------------------------------------------------------------------- //--------------------------- Include ---------------------------------------- #include "stdafx.h" #include "API.h" #include "LUA.h" #include "/EgtDev/Include/EInAPI.h" #include "/EgtDev/Include/EGnStringConverter.h" using namespace std ; //----------------------------------------------------------------------------- BOOL __stdcall EgtLuaSetContext( int nGseCtx) { return ( LuaSetGseContext( nGseCtx) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL __stdcall EgtLuaExecLine( const wchar_t* wsLine) { // eseguo il comando return ( LuaExecLine( wstrztoA( wsLine)) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL __stdcall EgtLuaExecFile( const wchar_t* wsFilePath) { // converto nome file string sFilePath = wstrztoA( wsFilePath) ; // emetto info string sInfo = "Exec File = " + sFilePath ; LOG_INFO( GetLogger(), sInfo.c_str()) // esecuzione script return ( LuaExecFile( sFilePath) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL __stdcall EgtLuaGetLastError( wchar_t*& wsError) { wsError = _wcsdup( stringtoW( LuaGetLastError())) ; return (( wsError == nullptr) ? FALSE : TRUE) ; }