MCPcopy Create free account
hub / github.com/T-Troll/alienfx-tools / GetProcessData

Function GetProcessData

alienfx-gui/EventHandler.cpp:44–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42};
43
44processdata GetProcessData(DWORD proc) {
45 char szProcessName[MAX_PATH]{ 0 };
46 HANDLE hProcess;
47 processdata res;
48 if (hProcess = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, proc)) {
49 if (GetModuleFileNameEx(hProcess, NULL, szProcessName, MAX_PATH)) {
50 string procName = string(szProcessName);
51 res.appName = procName.substr(procName.find_last_of('\\') + 1);
52 res.appPath = procName.substr(0, procName.length() - res.appName.length());
53 }
54 CloseHandle(hProcess);
55 }
56 return res;
57}
58
59processdata GetProcessData(HWND hwnd) {
60 DWORD prcId;

Callers 2

CheckProfileChangeMethod · 0.85
CCreateProcFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected