Add new option --no-write-registry
[cygwin-setup.git] / processlist.h
blobef734a3a2cc12c88b41a5d732a28a96cc189e94b
1 /*
2 * Copyright (c) 2013 Jon TURNEY
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
14 #include <windows.h>
15 #include <vector>
16 #include <string>
18 // ---------------------------------------------------------------------------
19 // interface to class Process
21 // access to a Windows process
22 // ---------------------------------------------------------------------------
24 class Process;
26 // utility type ProcessList, a vector of Process
27 typedef std::vector<Process> ProcessList;
29 class Process
31 public:
32 Process (DWORD pid);
33 std::string getName (void);
34 DWORD getProcessID (void);
35 void kill (int force);
36 bool isModuleLoadedInProcess (const WCHAR *moduleName);
37 static ProcessList listProcessesWithModuleLoaded (const WCHAR *moduleName);
38 private:
39 DWORD processID;
40 static ProcessList snapshot (void);