MCPcopy Create free account
hub / github.com/Do0ks/GSpots / IsProcessRunning

Function IsProcessRunning

UEVersionScanner/UEVersionScanner.cpp:147–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147bool IsProcessRunning(const std::string& exeName, DWORD& processID) {
148 HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
149 if (hSnapshot == INVALID_HANDLE_VALUE)
150 return false;
151 PROCESSENTRY32 pe;
152 pe.dwSize = sizeof(PROCESSENTRY32);
153 if (Process32First(hSnapshot, &pe)) {
154 do {
155 if (exeName == pe.szExeFile) {
156 processID = pe.th32ProcessID;
157 CloseHandle(hSnapshot);
158 return true;
159 }
160 } while (Process32Next(hSnapshot, &pe));
161 }
162 CloseHandle(hSnapshot);
163 return false;
164}
165
166std::string GetUnrealEngineVersion(const std::string& filePath, const std::string& exeName) {
167 DWORD processID = 0;

Callers 2

mainFunction · 0.85
GetUnrealEngineVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected