20 #include <coil/Process.h> 37 LPTSTR lpcommand =
new TCHAR[wcommand.size() + 1];
38 _tcscpy(lpcommand, wcommand.c_str());
41 LPTSTR lpcommand =
new TCHAR[command.size() + 1];
42 _tcscpy(lpcommand, command.c_str());
46 ZeroMemory( &si,
sizeof(si) );
49 PROCESS_INFORMATION pi;
50 ZeroMemory( &pi,
sizeof(pi) );
52 if(!CreateProcess(NULL, lpcommand, NULL, NULL,
FALSE, 0,
53 NULL, NULL, &si, &pi) )
58 CloseHandle(pi.hProcess);
59 CloseHandle(pi.hThread);
64 int daemon(
int nochdir,
int noclose)
int launch_shell(std::string command)
Launching a process.
int daemon(int nochdir, int noclose)
std::wstring string2wstring(std::string str)
string to wstring conversion
Common Object Interface Layer.