From d9b5a8e43f0758a2dfcf48f2f1164ef47d4d4d0c Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 31 Oct 2015 09:47:33 +0000 Subject: [PATCH] EgtInterface 1.6j4 : - modifiche per gestione DB utensili. --- API_MachMgr.cpp | 51 ++++++++++++++++++++++++++++++++++++------------ EgtInterface.rc | Bin 11726 -> 11726 bytes 2 files changed, 39 insertions(+), 12 deletions(-) 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 71dd34ac5322781fa6cc796a230a5f832ffa108b..aa2dec6a2f64404db6271f51d5a214e7831fdccd 100644 GIT binary patch delta 113 zcmX>XeJ*;#A2vpl%@4(HGEKh5na5}{`6H+9WG^L)&3#f*jGK>e8!&^VPclv3Cs+lM i-t491#khHcFjUGNr~*ls7YjlI&*XKAP&0v=TDSp_`6%@O delta 113 zcmX>XeJ*;#A2vqg%@4(HGEKh5na5~6`6H+9WG^L)&3#f*jGK>e8!&^VPclv3Cs+lM i-t491#khHcFjUGNr~*ls7YjlI&*XKAP&0v=TDSp^FDUH*