EgtInterface 2.3c2 :

- aggiornata interfaccia di EgtTdbToBeImported per nuovo parametro.
This commit is contained in:
Dario Sassi
2021-03-25 08:52:35 +00:00
parent 4e82fd5e8d
commit ced749f93d
3 changed files with 26 additions and 5 deletions
+3 -1
View File
@@ -200,6 +200,8 @@ __stdcall EgtDuploCount( int nSouId, int* pnCount)
BOOL
__stdcall EgtDuploList( int nSouId, int*& vInd, int* pnCount)
{
if ( &vInd == nullptr || pnCount == nullptr)
return FALSE ;
INTVECTOR vnRef ;
if ( ! ExeDuploList( nSouId, vnRef))
return FALSE ;
@@ -210,7 +212,7 @@ __stdcall EgtDuploList( int nSouId, int*& vInd, int* pnCount)
else {
vInd = (int*) malloc( nDim * sizeof( int)) ;
if ( vInd == nullptr)
return false ;
return FALSE ;
for ( int i = 0 ; i < nDim ; ++ i)
vInd[i] = vnRef[i] ;
}
+23 -4
View File
@@ -905,13 +905,15 @@ __stdcall EgtTdbExport( const wchar_t* wsToolsNames, const wchar_t* wsOutFile)
//-----------------------------------------------------------------------------
BOOL
__stdcall EgtTdbToBeImported( const wchar_t* wsFile, wchar_t*& wsToolsNames)
__stdcall EgtTdbToBeImported( const wchar_t* wsFile, wchar_t*& wsToolsNames, int*& vTypes, int* pnCount)
{
if ( &wsToolsNames == nullptr)
if ( &wsToolsNames == nullptr || &vTypes == nullptr || pnCount == nullptr)
return FALSE ;
STRVECTOR vsToolsNames ;
if ( ! ExeTdbToBeImported( string( wstrztoA( wsFile)), vsToolsNames))
INTVECTOR vToolsTypes ;
if ( ! ExeTdbToBeImported( string( wstrztoA( wsFile)), vsToolsNames, vToolsTypes))
return FALSE ;
// restituzione vettore nomi
string sToolsNames ;
for ( const auto& sName : vsToolsNames) {
if ( ! sToolsNames.empty())
@@ -919,7 +921,24 @@ __stdcall EgtTdbToBeImported( const wchar_t* wsFile, wchar_t*& wsToolsNames)
sToolsNames += sName ;
}
wsToolsNames = _wcsdup( stringtoW( sToolsNames)) ;
return (( wsToolsNames == nullptr) ? FALSE : TRUE) ;
if ( wsToolsNames == nullptr)
return FALSE ;
// restituzione vettore tipi
int nDim = int( vToolsTypes.size()) ;
if ( nDim == 0) {
vTypes = nullptr ;
}
else {
vTypes = (int*) malloc( nDim * sizeof( int)) ;
if ( vTypes == nullptr) {
free( wsToolsNames) ;
return FALSE ;
}
for ( int i = 0 ; i < nDim ; ++ i)
vTypes[i] = vToolsTypes[i] ;
}
*pnCount = nDim ;
return TRUE ;
}
//-----------------------------------------------------------------------------
BIN
View File
Binary file not shown.