MCPcopy Create free account
hub / github.com/WallBreaker2/op / EnumProcess

Method EnumProcess

libop/window/WindowProcess.cpp:100–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100bool WindowService::EnumProcess(const wchar_t *name, std::wstring &retstring) {
101 retstring.clear();
102 retstringlen = 0;
103 if (!name || wcslen(name) < 1)
104 return false;
105
106 enum_process_success_count = 0;
107 npid.clear();
108 if (!EnumProcessbyName(0, name))
109 return false;
110
111 for (const DWORD pid : npid)
112 append_process_id(retstring, pid);
113
114 return true;
115}
116
117int WindowService::GetProcessNumber() // 获取CPU个数
118{

Callers

nothing calls this directly

Calls 2

append_process_idFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected