From e3aef1e91947bc2c596e8deec191c8e7d262e6b8 Mon Sep 17 00:00:00 2001 From: DarioS Date: Tue, 4 Jan 2022 08:07:36 +0100 Subject: [PATCH] EgtInterface 2.4a1 : - aggiunta interfaccia per EgtGetCalcTool. --- API_MachMgr.cpp | 22 ++++++++++++++++++++++ EgtInterface.rc | Bin 11726 -> 11718 bytes 2 files changed, 22 insertions(+) diff --git a/API_MachMgr.cpp b/API_MachMgr.cpp index 840327e..6ccf5c8 100644 --- a/API_MachMgr.cpp +++ b/API_MachMgr.cpp @@ -1993,6 +1993,26 @@ __stdcall EgtSetCalcTool( const wchar_t* wsTool, const wchar_t* wsHead, int nExi return ( ExeSetCalcTool( wstrztoA( wsTool), wstrztoA( wsHead), nExit) ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtGetCalcTool( wchar_t*& wsTool, wchar_t*& wsHead, int* pnExit) +{ + if ( &wsTool == nullptr || &wsHead == nullptr || pnExit == nullptr) + return FALSE ; + string sTool, sHead ; + if ( ! ExeGetCalcTool( sTool, sHead, *pnExit)) + return FALSE ; + wsTool = _wcsdup( stringtoW( sTool)) ; + if ( wsTool == nullptr) + return FALSE ; + wsHead = _wcsdup( stringtoW( sHead)) ; + if ( wsHead == nullptr) { + free( wsTool) ; + return FALSE ; + } + return TRUE ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtGetCalcAngles( const double vtDirT[3], const double vtDirA[3], @@ -2059,6 +2079,8 @@ __stdcall EgtVerifyOutstroke( double dX, double dY, double dZ, double dAngA, dou BOOL __stdcall EgtGetOutstrokeInfo( wchar_t*& wsInfo) { + if ( &wsInfo == nullptr) + return FALSE ; string sInfo ; if ( ! ExeGetOutstrokeInfo( sInfo)) return FALSE ; diff --git a/EgtInterface.rc b/EgtInterface.rc index 55ef503ac5b197075c68dddc05a43963eef78cf0..2abcf1b073d364c78838737364833b1bdfa7f3c4 100644 GIT binary patch delta 263 zcmX>XeJpyzCpJzK1|0@N5T5){Oq0=MvpoNNrpc=$1twqP%wjcRNCZlJSusw2z{;`tj3^f) z76ZU8s6sIWYWrk;?x~YkNFxk#V%&U07ONqvnI^AOMD+sDC7b^%!JVI{lE4W7`OQuV delta 266 zcmX>WeJ*;#CpKP{};+QVqL zS(iJUko9@*S=KM#IUv+>