Witam,
Mam problem z uruchomieniem programu. Do niedawna działało wszystko w porządku aż pewnego dnia, przy uruchomieniu wyskakuje komunikat "Abnormal program termination". Nie bardzo wiem o co tu chodzi, co może być nie tak. Program działa wszędzie dobrze prócz win2003 server (na którym wcześniej również chodziło). Do programu dołączyłem cc3260mt.dll oraz stlpmt45.dll
Może ktoś z Was wie co by należało sprawdzić, zrobić bądź zmienić aby program działał poprawnie?
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <string>
#include <windows.h>
using namespace std;
int main () {
//pobranie ścieżki nazwy programu do wykonania
//pobranie ścieżki i nazwy pliku z argumentami
ifstream config("conf.ini");
string program, wsad;
config >> program;
config >> wsad;
config.close();
ifstream file(wsad.c_str());
//wywołanie
string call;
string call2;
string args;
size_t i;
while(!file.eof())
{
//pobranie argumentow
file >> args;
args.replace(2,1,"_");
string arg1 (args,0,8);
i = args.find_first_of(";");
string arg2 (args,int(i+1),args.length());
args.replace(2,1,".");
string arg3 (args,0,8);
call = program + " -o import -includeusersecurity -
updateversions 3 -url \"http:\/\/cop\/z1\/" + arg1 + "\" -filename
\"g:
\\archiwum\\z1_wzor.dat\"";
// call2 = program + " -o renameweb -url \"http:\/\/cop\/z1\/"
+ arg1 + "\" -newname \"" + arg3 + " " + arg2 + "\"";
cout << "Komenda 1: " << call << " \n\n";
// cout << "Komenda 2: " << call2 << " \n\n";
system("PAUSE");
cout << "\nWywoluje komende 1...\n";
system(call.c_str());
// cout << "Wykonuje komende 2...\n\n";
// system(call2.c_str());
//cout << program << " " << arg1 << " " << arg2 << endl;
}
file.close();
ofstream clear(wsad.c_str());
clear.flush();
clear.close();
cout << "\nKoniec dzialania programu. Dziekuje za uwage \:\-\)\n
\n";
system("PAUSE");
return 0;
}
Plik.txt zawiera numery projektów, np. 10.12345.3.1
Plik conf.ini ścieżka do programu uruchamianego oraz plik.txt - odczyt/zapis w tym pliku.