carruba74
hi to all,
in this day i try to write a small application that must lunch the rfactor game
I write this application into a c++ language.
I try to use two methods, but i reached the same result : the rfactor start, choose all the thing into menu, ecc ecc... without problem, but when i go to track, the game closed without any message, dont' appears the loading screen of the track
If i lunch directly the same installation with rfactor.exe, i have no problem, that means that the installation is ok.
This is the code that i used
first one
second one
have you an idea to solve the problem??
ciauzz
in this day i try to write a small application that must lunch the rfactor game
I write this application into a c++ language.
I try to use two methods, but i reached the same result : the rfactor start, choose all the thing into menu, ecc ecc... without problem, but when i go to track, the game closed without any message, dont' appears the loading screen of the track
If i lunch directly the same installation with rfactor.exe, i have no problem, that means that the installation is ok.
This is the code that i used
first one
Code:
SetCurrentDir(Game->Game_Path);
int result = spawnl(P_NOWAIT , Path_rFactor.c_str(), Path_rFactor.c_str(), NULL);
if (result == -1)
{
perror("Error from spawnl");
}
second one
Code:
SetCurrentDir(Game->Game_Path);
STARTUPINFO si;
PROCESS_INFORMATION pi;
memset(&pi, 0, sizeof(pi));
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
int res = CreateProcess(Path_rFactor.c_str(), 0, 0, 0, 0, 0, 0, 0, &si, &pi);
have you an idea to solve the problem??
ciauzz