MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / ArchPid

Method ArchPid

emmy_tool/src/windows/emmy_tool.windows.cpp:293–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293int EmmyTool::ArchPid() {
294 const DWORD processId = std::stoi(_cmd.GetArg(2));
295 char fileName[_MAX_PATH];
296 HANDLE process = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, processId);
297 GetModuleFileNameEx(process, nullptr, fileName, _MAX_PATH);
298
299 ExeInfo info;
300 if (GetExeInfo(fileName, info)) {
301 printf("%d", info.i386);
302 return info.i386;
303 }
304 return -1;
305}
306
307int EmmyTool::ReceiveLog() {
308 auto pid = _cmd.Get<DWORD>("p");

Callers 1

mainFunction · 0.80

Calls 2

GetExeInfoFunction · 0.85
GetArgMethod · 0.80

Tested by

no test coverage detected