EgtInterface 2.7c2 :

- aggiunta interfaccia funzione EgtGetAllInfo
- piccola miglioria accodamento stringhe con separatore '\n'.
This commit is contained in:
Dario Sassi
2025-03-22 18:07:41 +01:00
parent 7659e40140
commit 92769d6783
3 changed files with 43 additions and 30 deletions
+24 -30
View File
@@ -72,21 +72,19 @@ __stdcall EgtGetMachines( wchar_t*& wsMachineNames, wchar_t*& wsMachineDirs)
return FALSE ;
// restituzione vettore nomi
string sMachineNames ;
for ( const auto& sName : vsMachineNames) {
if ( ! sMachineNames.empty())
sMachineNames += "\n" ;
sMachineNames += sName ;
}
for ( const auto& sName : vsMachineNames)
sMachineNames += sName + "\n" ;
if ( ! sMachineNames.empty())
sMachineNames.pop_back() ;
wsMachineNames = _wcsdup( stringtoW( sMachineNames)) ;
if ( wsMachineNames == nullptr)
return FALSE ;
// restituzione vettore direttori
string sMachineDirs ;
for ( const auto& sName : vsMachineDirs) {
if ( ! sMachineDirs.empty())
sMachineDirs += "\n" ;
sMachineDirs += sName ;
}
for ( const auto& sName : vsMachineDirs)
sMachineDirs += sName + "\n" ;
if ( ! sMachineDirs.empty())
sMachineDirs.pop_back() ;
wsMachineDirs = _wcsdup( stringtoW( sMachineDirs)) ;
if ( wsMachineDirs == nullptr) {
free( wsMachineNames) ;
@@ -1019,11 +1017,10 @@ __stdcall EgtTdbToBeImported( const wchar_t* wsFile, wchar_t*& wsToolsNames, int
return FALSE ;
// restituzione vettore nomi
string sToolsNames ;
for ( const auto& sName : vsToolsNames) {
if ( ! sToolsNames.empty())
sToolsNames += "\n" ;
sToolsNames += sName ;
}
for ( const auto& sName : vsToolsNames)
sToolsNames += sName + "\n" ;
if ( ! sToolsNames.empty())
sToolsNames.pop_back() ;
wsToolsNames = _wcsdup( stringtoW( sToolsNames)) ;
if ( wsToolsNames == nullptr)
return FALSE ;
@@ -1061,11 +1058,10 @@ __stdcall EgtTdbImport( const wchar_t* wsFile, const wchar_t* wsToolsToImport, c
if ( ! ExeTdbImport( string( wstrztoA( wsFile)), vsToolsToImport, vsToolsNames, vsImported))
return FALSE ;
string sImported ;
for ( const auto& sName : vsImported) {
if ( ! sImported.empty())
sImported += "\n" ;
sImported += sName ;
}
for ( const auto& sName : vsImported)
sImported += sName + "\n" ;
if ( ! sImported.empty())
sImported.pop_back() ;
wsImported = _wcsdup( stringtoW( sImported)) ;
return (( wsImported == nullptr) ? FALSE : TRUE) ;
}
@@ -1369,11 +1365,10 @@ __stdcall EgtMdbToBeImported( const wchar_t* wsFile, wchar_t*& wsMachiningsNames
return FALSE ;
// restituzione vettore nomi
string sMachiningsNames ;
for ( const auto& sName : vsMachiningsNames) {
if ( ! sMachiningsNames.empty())
sMachiningsNames += "\n" ;
sMachiningsNames += sName ;
}
for ( const auto& sName : vsMachiningsNames)
sMachiningsNames += sName + "\n" ;
if ( ! sMachiningsNames.empty())
sMachiningsNames.pop_back() ;
wsMachiningsNames = _wcsdup( stringtoW( sMachiningsNames)) ;
if ( wsMachiningsNames == nullptr)
return FALSE ;
@@ -1411,11 +1406,10 @@ __stdcall EgtMdbImport( const wchar_t* wsFile, const wchar_t* wsMachiningsToImpo
if ( ! ExeMdbImport( string( wstrztoA( wsFile)), vsMachiningsToImport, vsMachiningsNames, vsImported))
return FALSE ;
string sImported ;
for ( const auto& sName : vsImported) {
if ( ! sImported.empty())
sImported += "\n" ;
sImported += sName ;
}
for ( const auto& sName : vsImported)
sImported += sName + "\n" ;
if ( ! sImported.empty())
sImported.pop_back() ;
wsImported = _wcsdup( stringtoW( sImported)) ;
return (( wsImported == nullptr) ? FALSE : TRUE) ;
}