2
3
4
5
20 STARTUPINFO StartInfo;
21 PROCESS_INFORMATION info;
23 ZeroMemory(&StartInfo,
sizeof(StartInfo));
24 StartInfo.cb =
sizeof(STARTUPINFO);
25 ZeroMemory(&info,
sizeof(PROCESS_INFORMATION));
32 const_cast<
wchar_t*>(command.c_str()),
36 NORMAL_PRIORITY_CLASS,
44 ss <<
"Process: " << processPath <<
" Open Failed";
46 SPICES_CORE_WARN(ss.str());
57 const std::string temp = std::string(
"C:/Windows/System32/TASKKILL.exe /F /IM ") + processName;
58 if(system(temp.c_str()) != 0)
60 SPICES_CORE_WARN(
"Process: " + std::string(processName) +
" Close Failed")
71 PROCESS_MEMORY_COUNTERS pmc;
72 if (GetProcessMemoryInfo(GetCurrentProcess(), &pmc,
sizeof(pmc)))
74 return pmc.WorkingSetSize / 1024.0f / 1024.0f / 1024.0f;
#define SPICES_PROFILE_ZONE
static bool CloseProcess(const char *processName)
Close a Process with command.
static bool OpenProcess(const char *processPath, const char *commandLine="")
Open a Process with command.
static float ProcessMemoryInUsed()
Get this Process Memory used( GB ).
Process Static Function Library.
static std::wstring CharToWChar(const char *c)
Transform char to wide char.
String Static Function Library.