diff --git a/API_MachMgr.cpp b/API_MachMgr.cpp index ca6e85b..f0c0798 100644 --- a/API_MachMgr.cpp +++ b/API_MachMgr.cpp @@ -714,6 +714,41 @@ __stdcall EgtTdbSetCurrToolParamString( int nType, const wchar_t* wsVal) return ( ExeTdbSetCurrToolParam( nType, string( wstrztoA( wsVal))) ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbSetCurrToolValInNotesBool( int nType, const wchar_t* wsKey, BOOL bVal) +{ + return ( ExeTdbSetCurrToolValInNotes( nType, string( wstrztoA( wsKey)), ( bVal != FALSE)) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbSetCurrToolValInNotesInt( int nType, const wchar_t* wsKey, int nVal) +{ + return ( ExeTdbSetCurrToolValInNotes( nType, string( wstrztoA( wsKey)), nVal) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbSetCurrToolValInNotesDouble( int nType, const wchar_t* wsKey, double dVal) +{ + return ( ExeTdbSetCurrToolValInNotes( nType, string( wstrztoA( wsKey)), dVal) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbSetCurrToolValInNotesString( int nType, const wchar_t* wsKey, const wchar_t* wsVal) +{ + return ( ExeTdbSetCurrToolValInNotes( nType, string( wstrztoA( wsKey)), string( wstrztoA( wsVal))) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbRemoveCurrToolValInNotes( int nType, const wchar_t* wsKey) +{ + return ( ExeTdbRemoveCurrToolValInNotes( nType, string( wstrztoA( wsKey))) ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtTdbGetCurrToolParamBool( int nType, BOOL* pbVal) @@ -758,6 +793,50 @@ __stdcall EgtTdbGetCurrToolParamString( int nType, wchar_t*& wsVal) return (( wsVal == nullptr) ? FALSE : TRUE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbGetCurrToolValInNotesBool( int nType, const wchar_t* wsKey, BOOL* pbVal) +{ + if ( pbVal == nullptr) + return FALSE ; + bool bVal ; + if ( ! ExeTdbGetCurrToolValInNotes( nType, string( wstrztoA( wsKey)), bVal)) + return FALSE ; + *pbVal = ( bVal ? TRUE : FALSE) ; + return TRUE ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbGetCurrToolValInNotesInt( int nType, const wchar_t* wsKey, int* pnVal) +{ + if ( pnVal == nullptr) + return FALSE ; + return ( ExeTdbGetCurrToolValInNotes( nType, string( wstrztoA( wsKey)), *pnVal) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbGetCurrToolValInNotesDouble( int nType, const wchar_t* wsKey, double* pdVal) +{ + if ( pdVal == nullptr) + return FALSE ; + return ( ExeTdbGetCurrToolValInNotes( nType, string( wstrztoA( wsKey)), *pdVal) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtTdbGetCurrToolValInNotesString( int nType, const wchar_t* wsKey, wchar_t*& wsVal) +{ + if ( &wsVal == nullptr) + return FALSE ; + string sVal ; + if ( ! ExeTdbGetCurrToolValInNotes( nType, string( wstrztoA( wsKey)), sVal)) + return FALSE ; + wsVal = _wcsdup( stringtoW( sVal)) ; + return (( wsVal == nullptr) ? FALSE : TRUE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtTdbGetCurrToolMaxDepth( double* pdVal) diff --git a/EgtInterface.rc b/EgtInterface.rc index 62fbc3e..702d2dc 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ