#include <windows.h>
#include <stdio.h>
#include <tchar.h>
int main(int argc ,char *argv[])
{
TCHAR szExe[] = _T("D://lip-vireo.exe");
TCHAR szCmd[] = _T("/"D://lip-vireo.exe/" -img D://0.jpg -d dog -p SIFT -dsdir D:// -c D://exam.conf");
STARTUPINFO si;
PROCESS_INFORMATION pi;
si.cb = sizeof(STARTUPINFO);
GetStartupInfo(&si);
if(!CreateProcess(NULL, szCmd,
NULL, // process info
NULL, // thread info
TRUE, // inheritable
0, // creation flags
NULL, // environment
NULL, // current directory
&si, & pi))
{
printf(_T("open process: %s failed with error: %d/n"), szExe, GetLastError());
}
else
{
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
//console.writeline();
}