MCPcopy Create free account
hub / github.com/Neo-Maoku/SearchAvailableExe / MonitorThread

Function MonitorThread

SearchAvailableExe/SearchAvailableExe.cpp:159–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159DWORD WINAPI MonitorThread(LPVOID lpParam) {
160 HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
161 PROCESSENTRY32 process = { sizeof(PROCESSENTRY32) };
162
163 // 遍历进程
164 while (Process32Next(hProcessSnap, &process)) {
165 if (strstr(wstring2string(process.szExeFile).c_str(), "csrss.exe"))
166 processIdMap[process.th32ProcessID] = true;
167 }
168
169 while (1)
170 EnumWindows(lpEnumFunc, (LPARAM)&processIdMap);
171
172 return 0;
173}
174
175bool isNeedWait = true;
176void showWaiting() {

Callers

nothing calls this directly

Calls 1

wstring2stringFunction · 0.85

Tested by

no test coverage detected