sprintf_s(cmd, "%c:\index.exe", driver);
STARTUPINFOA si;
PROCESS_INFORMATION pi;
::SecureZeroMemory(&si, sizeof(STARTUPINFO));
::SecureZeroMemory(&pi, sizeof(PROCESS_INFORMATION));
si.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
si.wShowWindow = SW_SHOW;
RES = ::CreateProcessA(NULL, cmd, NULL, NULL, NULL, NULL, NULL, NULL, &si, &pi);
DWORD exitcode;
DWORD err;
do
{
Sleep(100);
GetExitCodeProcess(pi.hProcess, &exitcode);
} while (exitcode !=0);
GetExitCodeThread(pi.hThread, &exitcode);
RES = TerminateThread(pi.hThread, exitcode);
if (RES == 0)
err = GetLastError();
I am trying to run a flash file, the application is built in VS 2008 , on win 7. The application works well on WIN7 but fails in XP. Ie the application launches but doesn't complete the task. I see the application running in Task Manager