EgtInterface 2.3c2 :
- aggiornata interfaccia di EgtTdbToBeImported per nuovo parametro.
This commit is contained in:
@@ -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
@@ -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 ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user