| 251 | } |
| 252 | |
| 253 | int EmmyTool::Attach() { |
| 254 | const int pid = _cmd.Get<int>("p"); |
| 255 | std::string dir = _cmd.Get<std::string>("dir"); |
| 256 | std::string dll = _cmd.Get<std::string>("dll"); |
| 257 | auto capture = _cmd.Get<bool>("capture-log"); |
| 258 | if (!InjectDll(pid, dir.c_str(), dll.c_str(), capture)) { |
| 259 | return -1; |
| 260 | } |
| 261 | |
| 262 | return 0; |
| 263 | } |
| 264 | |
| 265 | int EmmyTool::ListProcesses() { |
| 266 | std::vector<Process> list; |