diff --git a/API_MachMgr.cpp b/API_MachMgr.cpp index 878f32d..ca332a7 100644 --- a/API_MachMgr.cpp +++ b/API_MachMgr.cpp @@ -240,6 +240,19 @@ __stdcall EgtShowOnlyTable( bool bVal) //----------------------------------------------------------------------------- // Tools DataBase +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbGetToolNewName( const wchar_t* wsName, wchar_t*& wsNewName) +{ + if ( &wsNewName == nullptr) + return FALSE ; + string sNewName = wstrztoA( wsName) ; + if ( ! ExeTdbGetToolNewName( sNewName)) + return FALSE ; + wsNewName = _wcsdup( stringtoW( sNewName)) ; + return (( wsNewName == nullptr) ? FALSE : TRUE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtTdbAddTool( const wchar_t* wsName, int nType) @@ -289,51 +302,65 @@ __stdcall EgtTdbGetNextTool( int nFamily, wchar_t*& wsName, int* pnType) //----------------------------------------------------------------------------- BOOL -__stdcall EgtTdbSetToolParamInt( const wchar_t* wsName, int nType, int nVal) +__stdcall EgtTdbSetCurrTool( const wchar_t* wsName) { - return ( ExeTdbSetToolParam( wstrztoA( wsName), nType, nVal) ? TRUE : FALSE) ; + return ( ExeTdbSetCurrTool( wstrztoA( wsName)) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL -__stdcall EgtTdbSetToolParamDouble( const wchar_t* wsName, int nType, double dVal) +__stdcall EgtTdbSaveCurrTool( void) { - return ( ExeTdbSetToolParam( wstrztoA( wsName), nType, dVal) ? TRUE : FALSE) ; + return ( ExeTdbSaveCurrTool() ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL -__stdcall EgtTdbSetToolParamString( const wchar_t* wsName, int nType, const wchar_t* wsVal) +__stdcall EgtTdbSetCurrToolParamInt( int nType, int nVal) { - return ( ExeTdbSetToolParam( wstrztoA( wsName), nType, wstrztoA( wsVal)) ? TRUE : FALSE) ; + return ( ExeTdbSetCurrToolParam( nType, nVal) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL -__stdcall EgtTdbGetToolParamInt( const wchar_t* wsName, int nType, int* pnVal) +__stdcall EgtTdbSetCurrToolParamDouble( int nType, double dVal) +{ + return ( ExeTdbSetCurrToolParam( nType, dVal) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbSetCurrToolParamString( int nType, const wchar_t* wsVal) +{ + return ( ExeTdbSetCurrToolParam( nType, wstrztoA( wsVal)) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbGetCurrToolParamInt( int nType, int* pnVal) { if ( pnVal == nullptr) return FALSE ; - return ( ExeTdbGetToolParam( wstrztoA( wsName), nType, *pnVal) ? TRUE : FALSE) ; + return ( ExeTdbGetCurrToolParam( nType, *pnVal) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL -__stdcall EgtTdbGetToolParamDouble( const wchar_t* wsName, int nType, double* pdVal) +__stdcall EgtTdbGetCurrToolParamDouble( int nType, double* pdVal) { if ( pdVal == nullptr) return FALSE ; - return ( ExeTdbGetToolParam( wstrztoA( wsName), nType, *pdVal) ? TRUE : FALSE) ; + return ( ExeTdbGetCurrToolParam( nType, *pdVal) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL -__stdcall EgtTdbGetToolParamString( const wchar_t* wsName, int nType, wchar_t*& wsVal) +__stdcall EgtTdbGetCurrToolParamString( int nType, wchar_t*& wsVal) { if ( &wsVal == nullptr) return FALSE ; string sVal ; - if ( ! ExeTdbGetToolParam( wstrztoA( wsName), nType, sVal)) + if ( ! ExeTdbGetCurrToolParam( nType, sVal)) return FALSE ; wsVal = _wcsdup( stringtoW( sVal)) ; return (( wsVal == nullptr) ? FALSE : TRUE) ; diff --git a/EgtInterface.rc b/EgtInterface.rc index 71dd34a..aa2dec6 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ