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 55ef503..2abcf1b 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ