Open a Process with command.
17 {
19
20 STARTUPINFO StartInfo;
21 PROCESS_INFORMATION info;
22
23 ZeroMemory(&StartInfo, sizeof(StartInfo));
24 StartInfo.cb = sizeof(STARTUPINFO);
25 ZeroMemory(&info, sizeof(PROCESS_INFORMATION));
26
29
30 if (!CreateProcess(
31 path.c_str(),
32 const_cast<wchar_t*>(command.c_str()),
33 nullptr,
34 nullptr,
35 FALSE,
36 NORMAL_PRIORITY_CLASS,
37 nullptr,
38 nullptr,
39 &StartInfo,
40 &info
41 ))
42 {
43 std::stringstream ss;
44 ss << "Process: " << processPath << " Open Failed";
45
46 SPICES_CORE_WARN(ss.str());
47 return false;
48 }
49
50 return true;
51 }
#define SPICES_PROFILE_ZONE
static std::wstring CharToWChar(const char *c)
Transform char to wide char.