From f7fd201905c9b95b9eb6485803e725f2687155f3 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 29 Nov 2016 18:01:42 +0000 Subject: [PATCH] EgtInterface : - aggiunte EgtMdbSetGeneralParam e ExeMdbGetGeneralParam per bool e int. --- API_MachMgr.cpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/API_MachMgr.cpp b/API_MachMgr.cpp index c82ecf9..ea82697 100644 --- a/API_MachMgr.cpp +++ b/API_MachMgr.cpp @@ -846,6 +846,20 @@ __stdcall EgtMdbGetCurrMachiningParamString( int nType, wchar_t*& wsVal) return (( wsVal == nullptr) ? FALSE : TRUE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMdbSetGeneralParamBool( int nType, BOOL bVal) +{ + return ( ExeMdbSetGeneralParam( nType, bVal) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMdbSetGeneralParamInt( int nType, int nVal) +{ + return ( ExeMdbSetGeneralParam( nType, nVal) ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtMdbSetGeneralParamDouble( int nType, double dVal) @@ -853,6 +867,28 @@ __stdcall EgtMdbSetGeneralParamDouble( int nType, double dVal) return ( ExeMdbSetGeneralParam( nType, dVal) ? TRUE : FALSE) ; } +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMdbGetGeneralParamBool( int nType, BOOL* pbVal) +{ + if ( pbVal == nullptr) + return FALSE ; + bool bVal ; + if ( ! ExeMdbGetGeneralParam( nType, bVal)) + return FALSE ; + *pbVal = ( bVal ? TRUE : FALSE) ; + return TRUE ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMdbGetGeneralParamInt( int nType, int* pnVal) +{ + if ( pnVal == nullptr) + return FALSE ; + return ( ExeMdbGetGeneralParam( nType, *pnVal) ? TRUE : FALSE) ; +} + //----------------------------------------------------------------------------- BOOL __stdcall EgtMdbGetGeneralParamDouble( int nType, double* pdVal)