I used QProcess to start an external console program called client.exe.
Qt Code:
CommProcess->start("E:/work/client.exe"); cout << "client program is starting" << endl; cout << "client program is running" << endl; cout << "client program is NOT running" << endl << "Error Code : " << CommProcess->error() << endl;To copy to clipboard, switch view to plain text mode
It turns out with "client program is running". Seems everything is OK.
But actually it doesn't. Because I create a shared memory area in client.exe and open it in the current qt program. But I failed to open that area in current program.
If I run client.exe(both directly or using Visual C++ debugging model) before starting my qt program, everything just turns out OK.
Can anybody give me some hint ?
Bookmarks