| 224 | } |
| 225 | |
| 226 | bool WindowService::GetProcesspath(DWORD ProcessID, std::wstring &process_path) { |
| 227 | process_path.clear(); |
| 228 | |
| 229 | op::win32::unique_handle process(OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, ProcessID)); |
| 230 | if (!process) |
| 231 | return false; |
| 232 | |
| 233 | process_path = get_process_module_path(process.get()); |
| 234 | return !process_path.empty(); |
| 235 | } |
| 236 | |
| 237 | long WindowService::RunApp(const std::wstring &cmd, long mode, DWORD *pid) { |
| 238 | auto cmdptr = std::make_unique<wchar_t[]>(cmd.length() + 1); |
no test coverage detected