diff --git a/API_MaxFiller.cpp b/API_MaxFiller.cpp new file mode 100644 index 0000000..c64d0c6 --- /dev/null +++ b/API_MaxFiller.cpp @@ -0,0 +1,59 @@ +//---------------------------------------------------------------------------- +// EgalTech 2020-2020 +//---------------------------------------------------------------------------- +// File : API_MaxFiller.cpp Data : 06.11.20 Versione : 2.2k1 +// Contenuto : Funzioni nesting per API. +// +// +// +// Modifiche : 31.07.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +//--------------------------- Include ---------------------------------------- +#include "stdafx.h" +#include "API.h" +#include "/EgtDev/Include/EInAPI.h" +#include "/EgtDev/Include/EXeExecutor.h" + +using namespace std ; + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMaxFillerStart( void) +{ + return ( ExeMaxFillerStart() ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMaxFillerAddPart( int nPartId, double dLen, double dDispLen, int nCount) +{ + return ( ExeMaxFillerAddPart( nPartId, dLen, dDispLen, nCount) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMaxFillerCompute( double dLenToFill, double dStartGap, double dMidGap, double dEndGap, int nSortType) +{ + return ( ExeMaxFillerCompute( dLenToFill, dStartGap, dMidGap, dEndGap, nSortType) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMaxFillerGetResults( int* pnFilledParts, int* pnDiffParts, double* pdTotFillRatio) +{ + if ( pnFilledParts == nullptr || pnDiffParts == nullptr || pdTotFillRatio == nullptr) + return false ; + return ( ExeMaxFillerGetResults( *pnFilledParts, *pnDiffParts, *pdTotFillRatio) ? TRUE : FALSE) ; +} + +//----------------------------------------------------------------------------- +BOOL +__stdcall EgtMaxFillerGetOneResult( int nInd, int* pnPartId, int* pnCount) +{ + if ( pnPartId == nullptr || pnCount == nullptr) + return false ; + return ( ExeMaxFillerGetOneResult( nInd, *pnPartId, *pnCount) ? TRUE : FALSE) ; +} diff --git a/EgtInterface.rc b/EgtInterface.rc index 46dfff3..92b7e91 100644 Binary files a/EgtInterface.rc and b/EgtInterface.rc differ diff --git a/EgtInterface.vcxproj b/EgtInterface.vcxproj index ca14d08..b78fac4 100644 --- a/EgtInterface.vcxproj +++ b/EgtInterface.vcxproj @@ -238,6 +238,7 @@ copy $(TargetPath) \EgtProg\Dll64 + diff --git a/EgtInterface.vcxproj.filters b/EgtInterface.vcxproj.filters index 9001f93..c7b95d8 100644 --- a/EgtInterface.vcxproj.filters +++ b/EgtInterface.vcxproj.filters @@ -143,6 +143,9 @@ File di origine\API + + File di origine\API +