Patch level : 2.1 no patch
Files correlati : cgp4.exe Ricompilazione Demo : [ ] Commento : creazione file .ini in directory temporanea e cancellazione a fine programma git-svn-id: svn://10.65.10.50/trunk@12038 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
e0c0a37d01
commit
de2e423c13
@ -6,6 +6,7 @@
|
|||||||
#include <execp.h>
|
#include <execp.h>
|
||||||
#include <filetext.h>
|
#include <filetext.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
|
#include <strings.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
|
||||||
#include "cgp4.h"
|
#include "cgp4.h"
|
||||||
@ -197,7 +198,11 @@ bool TOmasa::transfer()
|
|||||||
if (coddip != olddip)
|
if (coddip != olddip)
|
||||||
{
|
{
|
||||||
ntransac++;
|
ntransac++;
|
||||||
movpn = new TConfig(format("omat%04d.ini",ntransac));
|
TFilename name;
|
||||||
|
name.tempdir();
|
||||||
|
name.add(format("omat%04d", ntransac));
|
||||||
|
name.ext(".ini");
|
||||||
|
movpn = new TConfig(name);
|
||||||
movpn->set_paragraph("Transaction");
|
movpn->set_paragraph("Transaction");
|
||||||
movpn->set("Action","INSERT");
|
movpn->set("Action","INSERT");
|
||||||
movpn->set("Mode","AUTO");
|
movpn->set("Mode","AUTO");
|
||||||
@ -264,8 +269,18 @@ bool TOmasa::transfer()
|
|||||||
_trasfile->close();
|
_trasfile->close();
|
||||||
delete _trasfile;
|
delete _trasfile;
|
||||||
|
|
||||||
TExternal_app primanota("cg2.exe -0 -iomat*.ini ");
|
TFilename tempdir;
|
||||||
|
tempdir.tempdir();
|
||||||
|
TString80 applicat = "cg2.exe -0 -i";
|
||||||
|
applicat << tempdir;
|
||||||
|
applicat << "\\omat*.ini";
|
||||||
|
TExternal_app primanota(applicat);
|
||||||
primanota.run();
|
primanota.run();
|
||||||
|
TString80 listfiles = tempdir;
|
||||||
|
listfiles << "\\omat*.ini";
|
||||||
|
list_files(listfiles, transactions);
|
||||||
|
FOR_EACH_ARRAY_ROW(transactions, rowf, namef)
|
||||||
|
remove(*namef);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user